logic_relay

From Source Entities
Jump to navigation Jump to search

Code classes:

Logic relay.png

logic_relay is a point entity present in all Source games. It fires outputs when told to, acting as a sort of middleman for IO. It's often used to organize map logic. It can be told to enable and disable itself, and cancel delayed inputs. The entity will prevent itself from firing while any delayed inputs are waiting to go through, meaning it has an optional cooldown on how often it can fire.

Flags[edit | edit source]

  • 1: Only trigger once - Makes the entity remove itself after firing either output.
  • 2: Allow fast retrigger - If the entity has any delayed inputs, this flag will allow it to refire even if those inputs have not fully sent.

Keyvalues[edit | edit source]

Start Disabled (StartDisabled) <boolean>
Stay inactive until Enabled.

Inputs[edit | edit source]

Trigger
Makes OnTrigger fire.
CancelPending
Cancels any delayed inputs from this entity which haven't gone through.
EnableRefire (Not in FGD)
Tells the entity it can refire even if it has delayed inputs waiting to fire. Delayed inputs will not be cancelled. The entity automatically sends this to itself once all its delayed inputs have gone through.
Enable
Makes the entity active.
Disable
Makes the entity inactive.
Toggle
If on, turn off. If off, turn on.

Outputs[edit | edit source]

OnTrigger
Fires when Trigger is sent.
OnSpawn
Fires when the entity spawns (map start or via point_template).

See Also[edit | edit source]