Trigger vphysics motion
From Valve Developer Community
| Table of contents |
[edit]
Entity Description
A volumetric trigger that affects the motion of vphysics objects that touch it.
[edit]
Availability
This brush-based entity is available in: HL2.
In code it is represented by class CTriggerVPhysicsMotion (http://doxygen.page.needed/class_c_trigger_v_physics_motion.html), defined in triggers.cpp (http://doxygen.page.needed/triggers_8cpp-source.html).
[edit]
Keyvalues
- targetname <target_source>
- Defines the name that other entities refer to this entity by.
- hammerid [Episode Two Update]
- <integer readonly> This id is used for debugging purposes in Hammer.
- parentname <target_destination>
- Specifies the targetname of this entity's Parent in a movement hierarchy. Child entities move with their Parent.
- If a trigger does not start out with a parent, but rather gets one during run-time, this value should be set to a static entity. This is so the entity's solidity is set to VPhysics rather than BSP.
- origin
- <origin> The position of this entity's center in the world. Rotating entities rotate around their origin.
- StartDisabled
- <boolean>
- globalname
- <string> Name by which this entity is linked to another entity in a different map. When the player transitions to a new map, entities in the new map with globalnames matching entities in the previous map will have the previous map's state copied over their state.
- filtername
- <filterclass> Filter to use to see if activator triggers me. See the filter_activator_name entity for further explanation.
- StartDisabled
- <choices> Start Disabled.
Literal value Description 0 No 1 Yes
- filtername
- <filterclass> Filter to use to see if activator triggers me. See filter_activator_name for more explanation.
- SetGravityScale
- <float> Scale gravity of objects in the field..
- SetAdditionalAirDensity
- <float> Additional air density for drag.
- SetVelocityLimit
- <float> Max velocity in field (0 disables).
- SetVelocityLimitDelta
- <float> Max amount to reduce velocity per second when it exceeds the velocity limit (0 disables).
- SetVelocityScale
- <float> Velocity scale/drag.
- SetAngVelocityLimit
- <float> Max angular velocity in field (degrees/s, 0 disables).
- SetAngVelocityScale
- <float> Angular Velocity scale/drag.
- SetLinearForce
- <float> Linear force (0 disables).
- SetLinearForceAngles
- <angle> Direction of linear force (Pitch Yaw Roll (Y Z X)).
- ParticleTrailMaterial
- <string> Name of a material to use for the particle trail, no name means no particle trail.
- ParticleTrailLifetime
- <float> Lifetime of the particles to emit.
- ParticleTrailStartSize
- <float> Starting size of the sprite to emit.
- ParticleTrailEndSize
- <float> Ending size of the sprite to emit.
- input Enable
- <void> Enable the trigger.
- input Toggle
- <void> Toggle enable/disable.
[edit]
Flags
- 1 : Applies to Clients
- 2 : Applies to NPCs
- 4 : Applies to Pushables
- 8 : Applies to Physics Objects
- 16 : Applies to Player Ally NPCs
- 32 : Applies to Clients in Vehicles
- 64 : Applies to Everything
- 512 : Applies to Clients not in Vehicles
- 1024 : Applies to Physics debris [Episode One Update]
- 4096 : Can move (through hierarchical attachment)
[edit]
Inputs
- Kill
- Removes this entity from the world.
- Removes this entity and all its children from the world.
- AddOutput <string>
- Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>
- Causes this entity's OnUser1-4 outputs to be fired. See User Inputs and Outputs.
- SetParent <target_destination>
- Changes the entity's parent in the movement hierarchy.
- SetParentAttachment <string>
- Change this entity to attach to a specific attachment point on its parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment.
- SetParentAttachmentMaintainOffset <string> [Episode One Update]
- Change this entity to attach to a specific attachment point on it's parent. Entities must be parented before being sent this input. The parameter passed in should be the name of the attachment. The entity will maintain it's position relative to the Parent's Origin and Angles at the time it is attached.
- Removes this entity from its current movement hierarchy.
- Enable
- Enable this entity.
- Disable
- Disable this entity.
- Toggle
- Toggles this trigger between enabled and disabled states.
- TouchTest [Episode Two Update]
- Triggers either OnTouching or OnNotTouching for whether anything is touching this entity.
- SetGravityScale <float>
- Scale gravity of objects in the field.
- SetAdditionalAirDensity <float>
- Additional air density for drag
- SetVelocityLimit <float>
- Max velocity in field.
- SetVelocityLimitDelta <float>
- Max amount to reduce velocity per second
- SetVelocityLimitTime <string>
- Format:
<new velocity> <delta time>
- SetVelocityScale <float>
- Velocity scale/drag
- SetAngVelocityLimit <float>
- Max angular velocity in field.
- SetAngVelocityScale <float>
- Angular Velocity scale/drag
- SetLinearForce <float>
- Linear force (0 disables)
[edit]
Outputs
- Fired in response to FireUser1-4 inputs. See User Inputs and Outputs.
- !activator = activator
- OnStartTouch
- Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.
- !activator = toucher
- OnTrigger
- Fired whenever the trigger is activated.
- !activator = activator
- OnEndTouch
- Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire.
- !activator = exiting entity
- OnEndTouchAll
- Fires when the last entity in the entity's area exits this trigger or when this entity is disabled. Only entities that passed this trigger's filters are considered.
- !activator = last exiting entity
- OnTouching [Episode Two Update]
- Fired when this entity's TouchTest is called.
- OnNotTouching [Episode Two Update]
- Fired when this entity's TouchTest is called.
