Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(added some stuff that should be confirmed.)
Line 3: Line 3:
}}
}}


{{base point|logic_relay|sprite=1}} 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.
{{base point|logic_relay|sprite=1}} 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. It can also be very helpful for organization and keeping you from having to edit MANY instances of the same outputs, as opposed to just one.


<!-- 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. -->
{{confirm|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 Targetname}}
{{KV EnableDisable}}
{{KV EnableDisable}}


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


== Inputs ==
==Inputs==
{{IO|Enable|Allows the relay to fire the OnTrigger outputs after being disabled.}}
{{IO|Disable|Prevents the relay from firing OnTrigger outputs in response to Trigger inputs.}}
{{IO|Trigger|Trigger the relay, causing its OnTrigger output to fire if it is enabled.}}
{{IO|Trigger|Trigger the relay, causing its OnTrigger output to fire if it is enabled.}}
{{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)}}
{{IO|EnableRefire|Allows a slow trigger to fire again. (See the second flag)}}
{{I EnableDisable}}
{{I Targetname}}
{{I Targetname}}
{{I EnableDisable}}


== 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.}}
{{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. {{confirm|Wouldn't {{ent|logic_auto}} be more appropriate?}}}}
{{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.}}
{{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.}}
{{O Targetname}}
{{O Targetname}}

Revision as of 19:57, 30 June 2018

Template:Otherlang2

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. It can also be very helpful for organization and keeping you from having to edit MANY instances of the same outputs, as opposed to just one.

Confirm: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.

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. (See the second flag)

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.
Confirm:Wouldn't logic_auto be more appropriate?
OnTrigger
Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.