Trigger impact: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Cleanup)
Line 1: Line 1:
{{wrongtitle|title=trigger_impact}}
{{base brush|trigger_impact}}
{{base_brush}}
{{sensor brush}}


==Entity Description==
==Entity Description==
A [[trigger]] [[brush entity|volume]] that can be told to push all [[physics]] objects that are inside of it in the direction specified by this trigger's angles. Also [[output]]s the force at the time of impact for anyone else that wants to use it.  
A [[trigger]] [[brush entity|volume]] that can be told to push all [[physics]] objects that are inside of it in the direction specified by this trigger's angles. Also [[output]]s the force at the time of impact for anyone else that wants to use it.  


{{sensor_brush}}
{{code class|CTriggerImpact|triggers.cpp}}
 
In code it is represented by class CTriggerImpact, defined in triggers.cpp.


==Keyvalues==
==Keyvalues==
*{{KV Targetname}}
{{KV|Magnitude|float|The strength of the impact. Negative values reverse the direction.}}
*{{KV Origin}}
{{KV|Noise|float|The amount of directional noise (0-1). 0 {{=}} no noise, 1 {{=}} random direction.}}
*{{KV Angles}}
{{KV|Viewkick|float|The amount to kick player's view if the player is in the trigger.  Proportional to magnitude (0-1).}}
*'''Magnitude'''
{{KV Targetname}}
:<float> The strength of the impact. Negative values reverse the direction.
{{KV Origin}}
*'''noise'''
{{KV Angles}}
:<float> The amount of directional noise (0-1). 0 = no noise, 1 = random direction.
*'''viewkick'''
:<float> The amount to kick player's view if the player is in the trigger.  Proportional to magnitude (0-1).
<!--==Flags==
None.
-->


==Inputs==
==Inputs==
*{{I Targetname}}
{{IO|Impact|Fire the impact, pushing all entities within the volume.|param=float}}
*'''Impact <float>'''
{{IO|SetMagnitude|Set the magnitude of the impact.|param=float}}
:Fire the impact, pushing all entities within the volume.
{{I Targetname}}
*'''SetMagnitude <float>'''
:Set the magnitude of the impact.


==Outputs==
==Outputs==
*{{O Targetname}}
{{IO|ImpactForce|Fired after an impact. The parameter passed along is the force of the impact that was generated.|param=string}}
*'''ImpactForce <string>'''
{{O Targetname}}
:Fired after an impact. The parameter passed along is the force of the impact that was generated.


[[Category:Physics]]
[[Category:Physics]]

Revision as of 06:16, 3 June 2011

Template:Base brush

Entity Description

A trigger volume that can be told to push all physics objects that are inside of it in the direction specified by this trigger's angles. Also outputs the force at the time of impact for anyone else that wants to use it.

C++ In code, it is represented by theCTriggerImpactclass, defined in thetriggers.cppfile.

Keyvalues

Magnitude ([todo internal name (i)]) <float>
The strength of the impact. Negative values reverse the direction.
Noise ([todo internal name (i)]) <float>
The amount of directional noise (0-1). 0 = no noise, 1 = random direction.
Viewkick ([todo internal name (i)]) <float>
The amount to kick player's view if the player is in the trigger. Proportional to magnitude (0-1).
Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.
Pitch Yaw Roll (Y Z X) (angles) <QAngle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Inputs

Impact <floatRedirectInput/float>
Fire the impact, pushing all entities within the volume.
SetMagnitude <floatRedirectInput/float>
Set the magnitude of the impact.


Outputs

ImpactForce <stringRedirectInput/string>
Fired after an impact. The parameter passed along is the force of the impact that was generated.