Half-Life Tutorials
Update: February 9, 2000
Name:
My First Elevator
Description:
This tutorial shows in easy steps how to create a simple triggered elevator by using the func_door entity
Update:

February 9, 2000
Download the tutorial here as *.zip file
Visit another Basic Half-Life Tutorial
My First Elevator - by Tiger

How to make a moving platform with a func_door entity


In this tutorial it will be shown how to make a simple triggered platform, moving between two floors. First after you have made the two floors, create a func_door entity with the size of the platform and bring it next to the first floor. Then make two func_button entities, one on the first and one on the second floor.



Now give the func_door entity these keys in the entity inspector:

First the angle for a up moving platform:
KEY: angle VALUE: -1

Then the speed it will move:
KEY: speed VALUE: 50

Then the name it will be triggered:
KEY: targetname VALUE: p1

Then the keys which tell the platform to wait until triggered again:
KEY: spawnflags VALUE: 36
KEY: wait VALUE: -1

And now it comes the most important key:
KEY: lip VALUE: -176



To find out what lip value you need, look at your z-screen. First look how high the floor #2 is above the floor #1, here in the example it's 200 - 8 = 192. Then you have to subtract the height of the platform ( 8 ) and the height of it's normal lip ( := the height of the platform) from the 192.
Now you get your lip, here in the example 192 - 8 - 8 = 176.

If you want to give the platform some sounds enter this keys:
KEY: movesnd VALUE: 6
KEY: stopsnd VALUE: 2

And if you want to have gate texture for the platform you also need these render keys:
KEY: rendermode VALUE: 2
KEY: renderamt VALUE: 255

Now your first moving platform is ready.



But wait we have forgotten the func_button entities. But you can give both one the same keys:

The target which the should trigger:
KEY: target VALUE: p1

The time the button waits before activating the target:
KEY: delay VALUE: 2

And the sound and the general settings to create a nonmoving button:
KEY: sounds VALUE: 8
KEY: spawnflags VALUE: 1




Additional Tutorial Information:
Entities of the tutorial: func_door
func_button
Visit also: My First Door
My First Moving Platform
Questions to: Tiger: tiger@qeradiant.com