Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(trocvareltdo)
m (revert)
Line 1: Line 1:
erletovarmon
{{wrongtitle|title=logic_relay}}
{{wrongtitle|title=logic_relay}}
==Entity Description==
== Entity description ==
[[Image:{{PAGENAME}}.png|right]]
[[Image:{{PAGENAME}}.png|right]]
A message forwarder. Fires an [[#Outputs|OnTrigger output]] when triggered, and can be disabled to prevent forwarding outputs.
A message forwarder. Fires an [[#Outputs|OnTrigger output]] when triggered, and can be disabled to prevent forwarding outputs.
Line 7: Line 6:
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}}
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}}


==Keyvalues==
== Keyvalues ==
 
* {{kv targetname}}
* {{kv targetname}}
* {{kv enabledisable}}
* {{kv enabledisable}}


==Flags==
== Flags ==
 
* 1 : '''Only trigger once''' (Default Checked)
* 1 : '''Only trigger once''' (Default Checked)
: If checked, this entity starts on.
: If checked, this entity starts on.
Line 20: Line 16:
: Allows fast retriggering.
: Allows fast retriggering.


==Inputs==
== Inputs ==
 
* {{i targetname}}
* {{i targetname}}
* {{i enabledisable}}
* {{i enabledisable}}
* '''Trigger'''
* '''Trigger'''
: Trigger the relay, causing its OnTrigger output to fire if it is enabled.
: Trigger the relay, causing its OnTrigger output to fire if it is enabled.
* '''Toggle'''
* '''Toggle'''
: Toggle the relay between enabled and disabled.
: Toggle the relay between enabled and disabled.
Line 34: Line 26:
: Cancel 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.


==Outputs==
== Outputs ==
 
* {{o targetname}}
* {{o targetname}}
* '''OnTrigger'''
* '''OnTrigger'''
: Fired when the relay is triggered. {{activator|activator}}
: Fired when the relay is triggered. {{activator|activator}}

Revision as of 01:05, 1 February 2008

Template:Wrongtitle

Entity description

Logic relay.png

A message forwarder. Fires an OnTrigger output when triggered, and can be disabled to prevent forwarding outputs.

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).

Keyvalues

Flags

  • 1 : Only trigger once (Default Checked)
If checked, this entity starts on.
  • 2 : Allow fast retrigger (Default Unchecked)
Allows fast retriggering.

Inputs

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.

Outputs

Fired when the relay is triggered. (!activator is the activator)
Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.