View Full Version : Tutorial 2b - Func_Train Lift, Multiple Floors + Lift Doors.

07-07-2014, 05:34 AM
Lift2 - A func_train lift with attached Doors.

In the previous tutorial (http://forums.svencoop.com/showthread.php/41587-Tutorial-2a-Func_Train-Lift-over-Multiple-Floors) we built a lift that traveled over multiple floors, in this tutorial we going to add some lift doors (i.e. Attached two doors to our previous setup.).

The classical (Half-Life 1) way of attaching “Doors” to a lift is to make the doors func_train (just like the lift itself) and to add some extra path_corners (pc_).
Reason: A door must close first, then travel up/down with the lift, then arrive in the “Closed Position”, Open, then wait.
[There is also a Sven Coop way to attach Lift Doors to a Lift via trigger_setorigin, but I will leave that for a later tutorial.]

So because a Door Starts closed, opens and then closes, we need a set of 3 x pc_’s, per Door per floor, compared with "a lifts" 1 x pc_ per floor.

Note: If you can build Lift1 as in the previous tutorial (http://forums.svencoop.com/showthread.php/41587-Tutorial-2a-Func_Train-Lift-over-Multiple-Floors) (and I recommend you do so as practice), then you can also do this tutorial. You are essentially doing the same thing as tutorial2a (http://forums.svencoop.com/showthread.php/41587-Tutorial-2a-Func_Train-Lift-over-Multiple-Floors) BUT due to the extra pc_’s it can get very confusing.
(HINT: Use a piece of paper to write down the pc_ linkages and Think about it until it becomes clear, then cross off each pc_ as you put them in map.)
See pic of rough work.

Note: Lift Door(s) Spawnflags:
Lift2_dr1/2_pcx2 has “Wait for retrigger” [ X ]
Also the Doors in the example are about 16 units too big (bigger than they need to be), this is because of potential lag.
Crush Damage 10,000 (Set it for both doors) because if they are blocked things will go “out of sync”.
The other two positions per floor don’t need any Spawnflags Checked because you only want the door to wait in the open position.

Setting up the the Doors (func_train(s))
First built some door shaped brushes, then “to entity” and make them func_trains. I named them
Lift2_dr1 and Lift2_dr2 (two different doors with different sets of path_corners ( pc_ ) )

Multi_manager ( mm_ ) to open/close the doors and then get them to sync with the Lift, you can use a mm_ (in example it is called
Name: mm_ctrl_lift2

[Close Door1, “Wait” Spawnflag not set, so door will continue to next floor. ]

[Close Door 2, “Wait” Spawnflag not set, so door will continue to next floor.][

[ Send lift2 to next floor]

Also note: that the pc_ for each door has two pc_'s (placed on top of each other for the "closed position". (Arrive Closed and Depart Closed). Hopefully the rest is self explanatory from looking at the attached example map.