func_elevator

From Source Entities
Jump to navigation Jump to search

Code classes:

func_elevator is a point entity present in both L4d.pngL4d2-small.pngLeft 4 Dead games. It simulates an elevator. It can be told to move to a top or bottom floor, and any number of additional floors specified by info_elevator_floors. Can only move vertically.

Bug: The entity may function incorrectly if "floors" are very close to each other.

Tip: If Top floor position and Bottom floor position are positioned correctly and helpers are enabled, there will be a circle above and below the brush with lines connecting both of them to the middle of the brush. Be careful to not confuse them with the Origin (origin) circle, which will not be connected by a line.

Keyvalues[edit | edit source]

Top floor position (top) <vecline>
Top floor. To make the elevator move here, send it MoveToFloor with top for the parameter.
Bottom floor position (bottom) <vecline>
Bottom floor. To make the elevator move here, send it MoveToFloor with bottom for the parameter.
Speed (speed) <float>
How fast the elevator moves, in units per second.
Acceleration (acceleration) <integer>
How fast the elevator speeds up to its target Speed in units per second, per second.
Start Moving Sound (startsound) <sound>
Sound played when the elevator starts moving.
Stop Moving Sound (stopsound) <sound>
Sound played when the elevator stops moving.
Disable Sound (disablesound) <sound>
Sound played when the elevator is Disabled.
Block Damage (blockdamage) <float>
How much to damage entities that block the elevator per tick.

Inputs[edit | edit source]

MoveToFloor <string>
Tells the elevator to move to a specified info_elevator_floor.
Disable
Stops the elevator and prevents it from moving again.
SetMaxSpeed <float> (only available in L4d2-small.png)
Sets Speed.

Outputs[edit | edit source]

OnReachedTop <string>
Fires when the elevator reaches Top floor position.
OnReachedBottom <string>
Fires when the elevator reaches Bottom floor position.