func_platform

XashXT

func_platform

A special mover that facilitates construction of multi-storey lifts.

Options

netname Target for env_counter to indicate the current floor.
height Height of a single storey (they must all be the same height).
target Target that is activated on arrival at the specified floor (even if the current floor is specified).
dmg If blocked, deal this much damage to the blocking entity.
volume Volume of motion and stop sounds (0–1).
movesnd Motion sound (0–13).
stopsnd Stop sound (0–8).

Usage Details

  • The algorithm is based on the notion that given the height of a single storey (this is either the height value or the height of the lift itself), the current position of the lift and the location of the first storey (this is always the lift spawn point), you can easily calculate where the lift should go by simply specifying the floor number using the < prefix and the floor number as the value.
  • Note that this is the only way you can use the object. It does not respond to other types of activation.
  • The object moves only vertically, but this limitation can be worked around by rotating its parent as necessary. Generally, you can think of this lift as a discrete mover—an object that can move the requested number of steps, where the step size is known.