Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 7: Line 7:
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.
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.


==Keyvalues==


==Entity Values==
* {{kv targetname}}
===Keys===


* '''Name''' ''targetname <target_source>'' 
* {{kv enabledisable}}
** The name that other entities refer to this entity by.
* '''Start Disabled''' ''StartDisabled <choices>''
** If '''Yes''', this entity starts disabled.


==Flags==


===Inputs===
* '''Only Trigger once''' (Default Checked)
** If checked, this entity starts on.
* '''Allow fast retrigger''' (Default Unchecked)
** Allows fast retriggering.
 
==Inputs==
 
* {{i targetname}}
 
* {{i enabledisable}}


* '''Kill'''
** Removes this entity from the world.
* '''KillHierarchy''' 
** Removes this entity and all its children from the world.
* '''AddOutput''' ''<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire (-1 == infinite)>''
** Adds an entity I/O connection to this entity. Very dangerous, use with care
* '''FireUser1'''
** Causes this entity's OnUser1 output to be fired.
* '''FireUser2'''
** Causes this entity's OnUser2 output to be fired.
* '''FireUser3'''
** Causes this entity's OnUser3 output to be fired.
* '''FireUser4'''
** Causes this entity's OnUser4 output to be fired.
* '''Enable'''
** Enable this entity.
* '''Disable'''
** Disable this entity.
* '''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.
* '''CancelPending'''
* '''CancelPending'''
** 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}}


* '''OnUser1'''
** Fired in response to FireUser1 input.
* '''OnUser2'''
** Fired in response to FireUser2 input.
* '''OnUser3'''
** Fired in response to FireUser3 input.
* '''OnUser4'''
** Fired in response to FireUser4 input.
* '''OnTrigger'''
* '''OnTrigger'''
** Fired when the relay is triggered.
: Fired when the relay is triggered.
 
 
===Flags===
 
* '''Only Trigger once''' (Default Checked)
** If checked, this entity starts on.
* '''Allow fast retrigger''' (Default Unchecked)
** Allows fast retriggering.


[[Category:Entities]]
[[Category:Entities]]

Revision as of 22:18, 11 July 2005

Template:Wrongtitle

Entity Description

Entity Name: logic_relay

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.

Keyvalues

Flags

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

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.

Outputs

  • OnTrigger
Fired when the relay is triggered.