Please or Register to create posts and topics.

Elevator movies not working in hammer

Hey guys! I'm really new to mapping, so excuse me if I get some terms wrong.

I just started working on my first test chamber, and I noticed the elevator didn't have any movies. I didn't pay much attention to it, but when I tried to replace the variables for $arrival_video and $departure_video in arrival_departure_transition_ents, it didn't work. I looked into it and I saw after PeTI came out it broke it. I also noticed there are the same variables in global_ents. Is that the correct one? I tried following the Valve Developer "Elevator (Portal 2) page that says "You were able to set the videos on the elevators by setting the variables in this instance before the DLC2 - update (Puzzlemaker) broke it. This is still possible. By replacing (remember to keep a backup of the original script) "<Your Steam Folder>\SteamApps\common\portal 2\portal2_dlc2\scripts\vscripts\video\video_splitter.nut" with "<Your Steam Folder>\SteamApps\common\portal 2\portal2\scripts\vscripts\video\video_splitter.nut" you'll be able to set arrival- and departure- videos, instead of a random one being chosen on upload."" I tried doing that but it didn't work. Any suggestions will be appreciated. Thanks!

Nente has reacted to this post.
Nente

bump

Nente has reacted to this post.
Nente

Sorry for the delay, for more speedy results consider joining the Discord.
As for your problem, try this guide:
https://cdn.discordapp.com/attachments/263051726897152001/635658481050976271/elevator.png

Quote from frood on May 12, 2020, 6:09 pm

Hey guys! I'm really new to mapping, so excuse me if I get some terms wrong.

I just started working on my first test chamber, and I noticed the elevator didn't have any movies. I didn't pay much attention to it, but when I tried to replace the variables for $arrival_video and $departure_video in arrival_departure_transition_ents, it didn't work. I looked into it and I saw after PeTI came out it broke it. I also noticed there are the same variables in global_ents. Is that the correct one? I tried following the Valve Developer "Elevator (Portal 2) page that says "You were able to set the videos on the elevators by setting the variables in this instance before the DLC2 - update (Puzzlemaker) broke it. This is still possible. By replacing (remember to keep a backup of the original script) "<Your Steam Folder>\SteamApps\common\portal 2\portal2_dlc2\scripts\vscripts\video\video_splitter.nut" with "<Your Steam Folder>\SteamApps\common\portal 2\portal2\scripts\vscripts\video\video_splitter.nut" you'll be able to set arrival- and departure- videos, instead of a random one being chosen on upload."" I tried doing that but it didn't work. Any suggestions will be appreciated. Thanks!

The problem is in your portal2/portal2_dlc2/scripts/vscripts/videos/video_splitter.nut
When valve realised the cummunity maps update they changed it a bit to work with these maps, but all it can do is choose a random and set it to the elevator.

HOW TO FIX:
Theres two option to fix this, a easy one and a harder customisable option

Easy option: go to portal2/portal2_dlc2/scripts/vscripts/videos/video_splitter.nut and make a copy of it with any name (like: goldfish.nut)
open it and search for "RandomVideos <-" (should be almost on the top.), if you delete all of them only one, thats gonna be the video that gonna plays
note:(well of course you have to change the elevator too, make sure its using the "goldfish.nut", open the elevator_logic instance and open the script icon, and switch the video_splitter.nut to "goldfish.nut")
Well thats it, when you launch your map you gonna still not see the videos, but when you realise on steam its gonna work (but before you launch it make sure to compile the map with  goldfish.nut file) (i used VIDE to do it.) tutorial: https://www.youtube.com/watch?v=zkOEo0FzfV0 (5:40)

Harder, more customisable option: You have to make your own elevator base.
To make it easier just copy a already done elevator_base and put it into a new folder like this: portal2/sdk_content/maps/instances/new folder
Open hammer, and put the instance in your map, duble click on it and choose EDIT INSTANCE.
Now the boring part, you have to name all of the vgui_movie_displays (all the 46) to screen_1...-46
*Make a logic_auto, and set it to (OnMapSpawn) fire "SetCustomUVs" and the parameter to "1" to all of the screens.
*After this create 4 logic_relay's name them:( uMin, uMax, vMin, vMax), and set the logic_auto to (OnMapSpawn) fire them with trigger and a "0.10" Afterdelay
*With ctrl+righ click select all of the vgui_movie display's and set the Group name to "screens"
*Create a new vgui_movie display and name it "screen_master"
*Set the group name to "screens", hight to: "32" width to:"32", Loop to: "yes", Stretch to: "yes", and put it next to the elevator into a hollowed box (with a nodraw texture)
*Make two more logic_relays with the name "screens_on" and "screens_off", and set them to fire enable and disable to all of the vgui_movie_displays (the screen_maser too)
To set the uMin, uMax, vMin, vMax read this tutorial about elevator videos, you have to set all of the 46 screens with the proper u and v setting.
https://steamcommunity.com/sharedfiles/filedetails/?id=668023096
for example if you want to screen_1 to play the video upper left corner set it to: uMin:"0.0" uMax:"0.2" vMin:"0.0" vMax:"0.5"
(this tells the display to play the movie but only the 0%-20% width and 0%-50% the hight.)

i belive i tell you all, to turn the screens on and of just use the logic_releay named: "screens_on" and ".._off" that you make.

i prefer the harder option cuz' you able to make tricks like in singleplayer the map called sp_a2_intro, when the end of the map the elevator screens got a "stretch" effect.
But if you want a quick fix just use the easy option, your decision.

I hope this helps.

Happy maping! -Not A Dog-