Template:KV TriggerOnce

From Valve Developer Community
Revision as of 19:50, 22 July 2009 by TomEdwards (talk | contribs) (Undo revision 122284 by Yar Kramer (Talk))

Jump to: navigation, search

TriggerOnce:

Filter Name <targetname>
Filter to use to see if activator triggers me. See the filter_activator_name entity for further explanation.

Origin:

Origin (X Y Z) (origin) <origin>
The position of this entity's center in the world. Rotating entities typically rotate around their origin.

EnableDisable:

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (probably with the Enable input).

Parentname:

Parent (parentname) <targetname>
Specifies a movement parent. An entity will maintain its initial offset from its parent. An attachment point can be added to the end of the name, separated by a comma.
Note: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.

Global:

Global Entity Name <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.

Targetname:

Name (targetname) <string>
The targetname that other entities refer to this entity by.
Entity Scripts (vscripts) <scriptlist> (in all games since <Left 4 Dead 2>)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function (thinkfunction) <string> (in all games since <Left 4 Dead 2>)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.