Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Some details about slow refiring.)
Line 10: Line 10:
== Flags ==
== Flags ==
* 1 : Only trigger once
* 1 : Only trigger once
* 2 : Allow fast retrigger
* 2 : Allow fast retrigger (otherwise there is a minimum delay of 0.001 seconds)


== Inputs ==
== Inputs ==
Line 16: Line 16:
{{IO|Toggle|Toggle the relay between enabled and disabled.}}
{{IO|Toggle|Toggle the relay between enabled and disabled.}}
{{IO|CancelPending|Cancel any events fired by this relay that are currently pending in the I/O event queue.}}
{{IO|CancelPending|Cancel any events fired by this relay that are currently pending in the I/O event queue.}}
{{IO|EnableRefire|Allows a slow trigger to fire again. (Used as an internal callback)}}
{{I Targetname}}
{{I Targetname}}
{{I EnableDisable}}
{{I EnableDisable}}

Revision as of 13:37, 25 September 2011

Template:Base point It is a message forwarder. It can be used to fire many outputs at once from just one input, or, by being disabled, to break an I/O chain.

Keyvalues

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

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

  • 1 : Only trigger once
  • 2 : Allow fast retrigger (otherwise there is a minimum delay of 0.001 seconds)

Inputs

Trigger
Trigger the relay, causing its OnTrigger output to fire if it is enabled.
Toggle
Toggle the relay between enabled and disabled.
CancelPending
Cancel any events fired by this relay that are currently pending in the I/O event queue.
EnableRefire
Allows a slow trigger to fire again. (Used as an internal callback)

EnableDisable:

Enable / Disable
Enable/disable this entity from performing its task. It might also disappear from view.

Outputs

OnSpawn
Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.
OnTrigger
Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.