Easy, infinitely scalable multilevel elevator that has NO alignment issues

Using the func_tracktrain gives us some missalignment when using a long track so when you arrive at a level there will be a step from the elevators floor to the levels floor.
I found the following method in order to fix this problem. It also has the benefit that the whole system is very easy to set up and requires no further I/O if more than three floors are used.

**Setup:
**
Make your elevator. It doesnt matter what it looks like. Make sure to parent everything that should move with it.
Flags:
-No Pitch (x-rot) unless you want that. Make sure your elevator is oriented towards 0 0 0 in that case (it will rotate correctly ingame)
-No User Control
-Fixed Orientation
-Is unblockable by player

http://i.imgur.com/Bd0rMLB.png[/t]

Create two path_track entities and connect them to each other. Place the bottom one where the elevator has its origin point (blue marker) or move the origin point of the elevator itself.
Make sure to set the “First Stop Target” in the func_tracktrains properties to the bottom path_track (called path in this case).
[t]http://i.imgur.com/2u73P0C.png[/t]

Create a func_button. Give it a name (elevator_buttons in this case) and place it at the first level. Copy that button and make it parent to the elevator (same name).
[t]http://i.imgur.com/kNWzkjh.png[/t]
**
Create an info_target** and place it at the exact same location as the bottom path_track is. Call it something like “target_level_1”
[t]http://i.imgur.com/pLNdb49.png[/t]

Create a logic_measure_movement and set it up as such:
“path1” is the upper path_track in this case
[t]http://i.imgur.com/En4qS7Z.png[/t]

Outputs

Lets start with the buttons. Select BOTH and give them the following Outputs.
[t]http://i.imgur.com/BBPrQPG.png[/t]

Next up is the upper path_track (its called path1 for me)
[t]http://i.imgur.com/cYsdU5M.png[/t]

Thats it for setting up the logic. Now its just copy/ pasting and renaming the info target to get more levels.
For example I made 4 levels but you can have say 100 levels and the logic wouldnt change.

To get a new level you will have to copy the buttons and create a new info_target where the elevators origin would be when it arrives at that level. Rename the target so it has the number on which floor it is on (target_level_2 etc).
Note that when adding a new floor a new button is made BOTH on the elevator and on the coresponding level.
[t]http://i.imgur.com/IlfKDPi.png[/t]

The new buttons I/O looks as follows (buttons for level 3 eg):
really the only thing that changes is the parameter for the logic_measure_movement.
[t]http://i.imgur.com/wC4er98.png

Tadaa youre done :slight_smile:

DOWNLOAD TO THE VMF THAT WAS USED IN THIS TUTORIAL

The cool thing is this can be used to create moving objects that do not have a fixed target. As you can also set the measuretarget to for example the player you are pretty much able to create guided missiles etc.

Holy shit this is 10 times better than fucking about with func_movelinear and SetPosition fractions.

Wow. This is so cool! Thank you for the good description and the good system!