Trigger push: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
 Bug:
Bug: Does not affect Common infected and witches  [todo tested in ?]
 Does not affect Common infected and witches  [todo tested in ?]
 Note:In
Note:In  changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".
 changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".
		
	
| m (reworded bug) |  (Added that the "Correctly account for object mass" spawnflag is also available in Garry's Mod.) | ||
| (7 intermediate revisions by 6 users not shown) | |||
| Line 1: | Line 1: | ||
| {{CD|CTriggerPush|file1=triggers.cpp}} | {{CD|CTriggerPush|file1=triggers.cpp}} | ||
| {{entity|trigger_push | {{this is a|brush entity|name=trigger_push}} It is a trigger volume that pushes entities that touch it, ''except'' those with a [[parent]]. | ||
| {{ | {{bug|{{l4d2}} Does not affect Common infected and witches}} | ||
| {{ | {{bug|{{csgo}} Does not affect [[drone]]s {{confirm}}}} | ||
| ==Keyvalues== | ==Keyvalues== | ||
| {{KV Targetname}} | |||
| {{KV|Push Direction|intn=pushdir|angle|Angles indicating the direction to push touched entities. | {{KV|Push Direction|intn=pushdir|angle|Angles indicating the direction to push touched entities. | ||
| {{note|In {{csgo}} changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".}}}} | {{note|In {{csgo}} changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".}}}} | ||
| Line 12: | Line 13: | ||
| {{KV|Only Falling Players|intn=OnlyFallingPlayers|boolean|since=CSGO|also=GMOD|Only affect players if they are falling (and not pressing jump).}} | {{KV|Only Falling Players|intn=OnlyFallingPlayers|boolean|since=CSGO|also=GMOD|Only affect players if they are falling (and not pressing jump).}} | ||
| {{KV|Player fall speed|intn=FallingSpeedThreshold|float|since=CSGO|also=GMOD|A player must be falling this fast for them to be pushed.}} | {{KV|Player fall speed|intn=FallingSpeedThreshold|float|since=CSGO|also=GMOD|A player must be falling this fast for them to be pushed.}} | ||
| {{KV BaseTrigger}} | |||
| ==Flags== | ==Flags== | ||
| Line 17: | Line 19: | ||
| {{Fl|128|Once Only (possibly means set velocity rather than apply acceleration)}} | {{Fl|128|Once Only (possibly means set velocity rather than apply acceleration)}} | ||
| {{Fl|256|Affects Ladders (Half-Life 2)}} | {{Fl|256|Affects Ladders (Half-Life 2)}} | ||
| {{Fl  | {{Fl BaseTrigger}} | ||
| {{Fl|4096|Correctly account for object mass (<code>trigger_push</code> used to assume 100Kg) and multiple component physics objects (car, blob...)|since={{as}}|also=GMOD}} | |||
| ==Inputs== | ==Inputs== | ||
| {{ | {{I|SetPushSpeed|param=int|Set the push speed in inches / second.|only=l4d2}} | ||
| {{ | {{I|SetPushDirection|param=vector|Sets the push angle of the trigger.|since=AS|also=GMOD}} | ||
| {{ | {{I|SetSpeed|param=int|Sets the push speed. Still takes alternate tick keyvalue into account.|only={{P2CE}}}} | ||
| {{I  | {{I BaseTrigger}} | ||
| ==Outputs== | ==Outputs== | ||
| {{O  | {{O BaseTrigger}} | ||
| == See Also == | |||
| * {{ent|script_trigger_push}} | |||
Latest revision as of 07:19, 4 October 2025
|  Class hierarchy | 
|---|
| CTriggerPush | 
|  triggers.cpp | 
trigger_push  is a   brush entity  available in all  Source games. It is a trigger volume that pushes entities that touch it, except those with a parent.
 Source games. It is a trigger volume that pushes entities that touch it, except those with a parent.
 Bug:
Bug: Does not affect Common infected and witches  [todo tested in ?]
 Does not affect Common infected and witches  [todo tested in ?]Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentnameortarget).
 Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Push Direction (pushdir) <angle>
- Angles indicating the direction to push touched entities.
 Note:In
Note:In  changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".
 changing this keyvalue via "Point At..." creates a new "angles" property. Copy its value to "Push Direction".- Speed of Push (speed) <integer>
- The speed at which to push entities away, in inches / second.
- Scale force for alternate ticks (alternateticksfix) <float>
- If nonzero, scale the force by this amount when running with alternate ticks. This fixes problems with an overly large force due to the longer frametime on when running with sv_alternateticks 1.
- Trigger on Start Touch (triggeronstarttouch)  <boolean> (only in  ) )
- Trigger on start touch instead of on touch.
- Only Falling Players (OnlyFallingPlayers)  <boolean> (in all games since  ) (also in ) (also in ) )
- Only affect players if they are falling (and not pressing jump).
- Player fall speed (FallingSpeedThreshold)  <float> (in all games since  ) (also in ) (also in ) )
- A player must be falling this fast for them to be pushed.
| 
 
 | 
Flags
TriggerPush:
- Once Only (possibly means set velocity rather than apply acceleration) : [128]
- Affects Ladders (Half-Life 2) : [256]
| 
 
 
 
 
 
 
 
 | 
- Correctly account for object mass (trigger_pushused to assume 100Kg) and multiple component physics objects (car, blob...) : [4096] (in all games since ) (also in ) (also in ) )
Inputs
- SetPushSpeed  <integer> (only in  ) )
- Set the push speed in inches / second.
- SetSpeed  <integer> (only in  ) )
- Sets the push speed. Still takes alternate tick keyvalue into account.
| 
 
 
 
 | 
Outputs
| 
 
 
 
 
 
 | 







