logic_relay
logic_relay
is a point entity available in all Source 2 games. It acts as a message forwarder 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.
After a logic_relay
is triggered, it cannot be triggered again until all of its outputs are fired. This is useful for when a relay has a sequence of delayed outputs that shouldn't be repeated until the sequence is finished. This behavior can be disabled by setting FastRetrigger to true.
Keyvalues
- Name
(targetname)
<string> - The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
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 the
Enable
input). - Trigger Once
(TriggerOnce)
<boolean> - Deletes the logic relay after firing an OnTrigger Output or a connected OnSpawn output
- Fast Retrigger
(FastRetrigger)
<boolean> - Without this, the logic_relay will wait until all inputs connected to OnTrigger have fired before retriggering
- Pass through caller
(PassthroughCaller)
<boolean> - If set, this logic_relay will be ignored by !caller in downstream IO connections. Instead, the previous caller in the IO chain will be found by !caller.
Inputs
Enable
- Allows the relay to fire the OnTrigger outputs after being disabled.
Disable
- Prevents the relay from firing OnTrigger outputs in response to Trigger 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 Bug:Using
CancelPending
on itself breaks the Service Queue which leads to a crash. [todo tested in?]
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.Note:Every level load (including save loads!) triggers this output, unless "Fire once only" is checked.
OnTrigger
- Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.