Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Robot: fixing template case.)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=logic_relay}}
[[File:logic_relay.png|left]] {{DISPLAYTITLE:logic_relay}} __NOTOC__
{{base_point}}


== Entity description ==
{{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.
[[Image:{{PAGENAME}}.png|right]]
{{clr}}
A message forwarder. Fires an [[#Outputs|OnTrigger output]] when triggered, and can be disabled to prevent forwarding outputs.
== Keyvalues ==


Useful as an intermediary between one entity and another for turning on or off an I/O connection, or as a container for holding a set of outputs that can be triggered from multiple places. Additionally, its Enabled/Disabled state can be used for conditional logic ("if, then" style logic).{{clr}}
{{KV EnableDisable}}
 
{{KV Targetname}}
== Keyvalues ==
* {{KV Targetname}}
* {{KV EnableDisable}}


== Flags ==
== Flags ==
* 1 : '''Only trigger once''' (Default Checked)
* Only trigger once
: If checked, this entity starts on.
* Allow fast retrigger (There is otherwise a 0.1 second delay between triggering)
* 2 : '''Allow fast retrigger''' (Default Unchecked)
: Allows fast retriggering.


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


== Outputs ==
== Outputs ==
* {{O Targetname}}
 
* '''OnTrigger'''
; <code>OnTrigger</code>
: Fired when the relay is triggered. {{activator|activator}}
: Fired when the relay receives the <code>Trigger</code> input.
* '''{{EP1 add|OnSpawn}}'''
; <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.
: 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}}

Revision as of 13:44, 22 July 2009

Logic relay.png

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

Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).
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

Flags

  • Only trigger once
  • Allow fast retrigger (There is otherwise a 0.1 second delay between triggering)

Inputs

Trigger
Fire OnTrigger, if the relay is enabled.
Toggle
Toggle between enabled and disabled.
CancelPending
Cancels 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

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