Download exampleThis question had been asked in our editing forum so after making an example map, I decided to write a tutorial. So here it is. This tutorial doesn't really delve into anything new, just a combination of things explained in our other tutorials. You should have at least read our
Level Transitions tutorial before reading this one.
The level change in this tutorial is only one way. Here is the basic setup. You walk into the elevator, push the button, the doors close and the level changes. Then on the next level it rumbles a little bit then the sound of an elevator moving is heard then it rumbles again, a bell sounds, and the door opens.
The first thing we need to do is make a level change. For more information on how to do that, please read our Level Transitions tutorial. Now as you know, the
trigger_changelevel entity is brush based and changes the level when you walk through it. Well that's not going to work for us. So we need to check one flag on our changelevel entity, the
USE Only flag. Now the
trigger_changelevel won't change the level unless it has been triggered.
By my funky looking flowchart on the left, you can see the basic setup for the first level. So here's a run through of what happens. The player pushes the button which causes the elevator doors to close. When the doors close, they trigger the
multi_manager. After a 1 second delay, the
multi_manager triggers the level change and you get taken to level 2.
The even more funky looking flowchart below shows the setup in level 2. Two things I didn't put in the flowchart are the flags needed for the
ambient_generic s. They both need to have the
Start Silent and
Is NOT Looped flag checked. So once again we'll go with a run through. The level starts and the
trigger_auto activates the
multi_manager.1 seconds after the start of the level. The multi_manager activates the
env_shake after 1 second, then after 1.5 seconds the sound of the elevator moving is heard. After 4.5 seconds that sound stops and the env_shake is activated again .5 seconds later. Then after 6 seconds the doors open and you're free to leave the elevator. Once again, the
multi_manager entity is the key here. It's like a glue that holds everything together. You can also spice this up some more. In the Uplink demo you hear the elevator move presumably down, then a bell and then the doors open then you step inside. This can easily be done by adding a
trigger_auto to the first level and have it target a
multi_manager that activates the sounds and opens the doors.
More on Elevator Level Changes.
The thing to remember is that the elevator you go in (in this case) doesn't really move. You only get the illusion that it does. Also, I explained how to make a "one way" level change. With a little modification you can easily make this a "two way" level change.
This article was originally published on
69th Vlatitude.
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the
TWHL Archiving Project page.
DO USE instead "change target" in trigger_changelevel of the first map to fire eleend_mm on the second level. This makes it repeatable and reliable.
If the elevator is to be used both ways, the reverse setup is also needed.
If you want to study how Valve does it, use newbspguy and open any Half-Life map with elevator changelevels.