Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(...)
(Cleanup)
Line 1: Line 1:
[[File:logic_relay.png|left]] __NOTOC__
{{base point|logic_relay}}


{{base point|logic_relay}} It is a message forwarder. It can be used to fire many [[output]]s at once from just one input, or, by being disabled, to break an I/O chain.
== Entity description ==
[[File:logic_relay.png|left|link=]]
A message forwarder. It can be used to fire many [[output]]s at once from just one input, or, by being disabled, to break an I/O chain.


<!-- needs confirmation, this has always been possible in the past | This entity is crucial to use when using more than 5 outputs/inputs, otherwise the game will get the delays wrong/not out/input all of them. -->
<!-- needs confirmation, this has always been possible in the past | This entity is crucial to use when using more than 5 outputs/inputs, otherwise the game will get the delays wrong/not out/input all of them. -->
{{clr}}
{{clr}}
== Keyvalues ==
== Keyvalues ==
 
{{KV Targetname}}
{{KV EnableDisable}}
{{KV EnableDisable}}
{{KV Targetname}}


== Flags ==
== Flags ==
* Only trigger once
* 1 : Only trigger once
* Allow fast retrigger (There is otherwise a 0.1 second delay between triggering)
* 2 : Allow fast retrigger


== Inputs ==
== Inputs ==
 
{{IO|Trigger|Trigger the relay, causing its OnTrigger output to fire if it is enabled.}}
; <code>Trigger</code>
{{IO|Toggle|Toggle the relay between enabled and disabled.}}
: Fire <code>OnTrigger</code>, if the relay is enabled.
{{IO|CancelPending|Cancel any events fired by this relay that are currently pending in the I/O event queue.}}
; <code>Toggle</code>
{{I Targetname}}
: Toggle between enabled and disabled.
; <code>CancelPending</code>
: Cancels any events fired by this relay that are currently pending in the I/O event queue.
{{I EnableDisable}}
{{I EnableDisable}}
{{I Targetname}}


== Outputs ==
== Outputs ==
 
{{IO|OnSpawn|Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.}}
; <code>OnTrigger</code>
{{IO|OnTrigger|Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.}}
: Fired when the relay receives the <code>Trigger</code> input.
; <code>OnSpawn</code>
: Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.
{{O Targetname}}
{{O Targetname}}

Revision as of 23:56, 8 June 2011

Template:Base point

Entity description

Logic relay.png

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

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.

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.