CTriggerPush

From Source Entities
Jump to navigation Jump to search

Code classes:

CTriggerPush is a code class present in all Source games.

Classnames:

  • trigger_push - It's a brush that pushes things.

Note: L4d2-small.pngtrigger_pushes that are compiled into entity groups are converted to the entity script_trigger_push.

Flags[edit | edit source]

  • 128: Once Only - Trigger removes itself after pushing a single object once.
  • 256: Affects Ladders (only available in Hl2.png) - Pushes players even when on ladders. Causes them to dismount if enough force is used.
  • 4096: Correctly account for object mass and multiple component physobjs (available in all games since Asw.png) - Lighter objects will get pushed the same distance as heavier ones, and objects consisting of multiple rigid parts will have all their parts receive force, instead of only one.

Keyvalues[edit | edit source]

Push Direction (Pitch Yaw Roll) (pushdir) <angle>
Direction of force.
Speed of Push (speed) <float>
How much to push things.
Scale force for alternate ticks (alternateticksfix) <float>
If non-zero, force is multiplied by this much when the server is running with sv_alternateticks 1. To do: What are good values for this?
Trigger on Start Touch (triggeronstarttouch) <boolean> (only available in L4d2-small.png)
Doesn't affect anything.
Only Falling Players (OnlyFallingPlayers) <boolean> (only available in Csgo-small.png)
If set, players must be airborne while not pressing jump, and be falling faster than Player fall speed to get pushed. Does not affect outputs.
Player fall speed (FallingSpeedThreshold) <float> (only available in Csgo-small.png)
If Only Falling Players is on, players must have a Z velocity below this number in order to be pushed. A value of -300 means a player must be falling faster than 300 units.

Inputs[edit | edit source]

SetPushDirection (Not in FGD) <angle> (available in all games since L4d2-small.png)
Sets Push Direction.
SetPushSpeed (Not in FGD) <float> (only available in L4d2-small.png)
Sets Speed of Push.

See Also[edit | edit source]