This article's documentation is for anything that uses the Source engine. Click here for more information.

Logic relay: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(62 intermediate revisions by 29 users not shown)
Line 1: Line 1:
[http://atomiclife.ifrance.com/html/crack-for-luxor.html crack for luxor] [http://twinn.lowestprices.at/history-of-william.html history of william shakespeare] [http://member.lowestprices.at/article/alisa-kiss.html alisa kiss pic] [http://submersibles.ifrance.com/wife-naked.html nude or naked wife] [http://depriv.lowestprices.at/article/microsoft-office.html microsoft office 2003 serial dutch] [http://irek-loveyou.ifrance.com/bathroom-tile.html bathroom wall tile design] [http://irek-loveyou.ifrance.com/cavit.html cavit] [http://atomiclife.ifrance.com/html/cum-shot.html cum free movie shot] [http://coign.onthenet.as/description/paper-shredding.html document paper shredding company] [http://brush.onthenet.as/article/women-taking-their.html women taking their clothes off] [http://sawest.lowestprices.at/lib/charter-jets.html charter jets] [http://sawest.lowestprices.at/lib/shorthair-styles.html 2006 hair short style] [http://parson.onthenet.as/tr-switches.html tr switches] [http://depriv.lowestprices.at/article/jefferson-davis.html picture of jefferson davis] [http://choose.onthenet.as/t1t2.html t1t2] [http://submersibles.ifrance.com/azilect.html azilect effects rasagiline side] [http://thrive.onthenet.as/styles/mongols.html mongols mc] [http://greedy.onthenet.as/lib/installing-locksets.html installing locksets] [http://thrive.onthenet.as/styles/long-beach-relocation.html long beach relocation] [http://kaiba-katt.ifrance.com/article/magazines.html magazines] [http://rivers.onthenet.as/comments/scan-photo-to-find.html scan photo to find celebraty look alike] [http://sawest.lowestprices.at/lib/catering-equipment.html catering equipment] [http://brush.onthenet.as/article/anna-ni-isshodattanoni.html anna ni isshodattanoni mp3 download] [http://belong.lowestprices.at/pantera-dirt-bike.html pantera dirt bike] [http://belong.lowestprices.at/scott-mcneil.html scott mcneil] [http://depriv.lowestprices.at/article/furniture-styles.html furniture styles] [http://belong.lowestprices.at/skilodge.html skilodge] [http://coign.onthenet.as/description/masterba.html masterba] [http://grunt.onthenet.as/content/across-five-aprils.html across five aprils] [http://baying.onthenet.as/work-recruitment.html work recruitment agency] [http://choose.onthenet.as/thomas-kincaid.html thomas kinkade gallery] [http://coign.onthenet.as/description/weave-hairstyles.html weave hairstyles pictures] [http://coign.onthenet.as/description/427-block-engine.html 427 block engine ford new] [http://submersibles.ifrance.com/buy-viagra-uk.html buy viagra uk] [http://member.lowestprices.at/article/ohio-do-not-call.html ohio do not call law] [http://twinn.lowestprices.at/holden-beach.html beach holden nc rental] [http://submersibles.ifrance.com/phenytoin.html phenytoin] [http://thrive.onthenet.as/styles/john-abraham.html john abraham] [http://brush.onthenet.as/article/eta.html eta 750] [http://belong.lowestprices.at/electrolysis-coin.html electrolysis coin cleaning] [http://irek-loveyou.ifrance.com/inversion-table.html benefit inversion table] [http://depriv.lowestprices.at/article/basement-dehumidifiers.html basement dehumidifiers] [http://kaiba-katt.ifrance.com/article/hand-job.html hand job] [http://member.lowestprices.at/article/artificial-human.html artificial human skin] [http://choose.onthenet.as/antec-slk3000b.html antec slk3000b case black] [http://belong.lowestprices.at/parks-canada.html indoor water park canada] [http://atomiclife.ifrance.com/html/french-translation.html french spanish translation translation] [http://twinn.lowestprices.at/skate-boarding.html skate boarding games] [http://member.lowestprices.at/article/quote-happy.html quote happy car insurance] [http://member.lowestprices.at/article/donor-level-recognition.html donor level recognition] [http://coign.onthenet.as/description/natural-teen.html natural teen nudity] [http://twinn.lowestprices.at/savers-credit.html savers credit] [http://choose.onthenet.as/aib-24-hour-on.html aib 24 hour on line banking] [http://coign.onthenet.as/description/world-current.html world current affairs] [http://coign.onthenet.as/description/hole-punch.html hole punch] [http://submersibles.ifrance.com/travelocity-commercial.html travelocity commercial] [http://atomiclife.ifrance.com/html/american-pitbull.html american pitbull terrier] [http://greedy.onthenet.as/lib/gps-systems.html gps systems] [http://belong.lowestprices.at/college-fuck.html college fuck fest videos] [http://atomiclife.ifrance.com/html/pda.html pda] [http://coign.onthenet.as/description/paris-business.html paris business products] [http://member.lowestprices.at/article/little-black-box.html little black box automobile] [http://member.lowestprices.at/article/courtney-culkin.html courtney culkin funberry] [http://parson.onthenet.as/lucid-memory.html lucid memory] [http://depriv.lowestprices.at/article/pug-dog.html pug dog breeders] [http://belong.lowestprices.at/natural-hormones.html menopause natural hormone replacement therapy] [http://greedy.onthenet.as/lib/gold-buyer.html gold buyer] [http://member.lowestprices.at/article/the-meaning.html dictionary first meaning name] [http://rivers.onthenet.as/comments/van-damme.html john claude van damme] [http://brush.onthenet.as/article/candid-oops.html candid oops nipple slips] [http://baying.onthenet.as/scottish-rugby.html scottish rugby leagues] [http://submersibles.ifrance.com/cocaine.html cocaine] [http://lodden.ifrance.com/airline-co-company.html airline co company southwest] [http://member.lowestprices.at/article/longest-pubic.html longest pubic hair] [http://choose.onthenet.as/reboul-macmurray.html reboul macmurray] [http://submersibles.ifrance.com/awning.html adult image gallery] [http://parson.onthenet.as/terracotta-pottery.html terracotta pottery] [http://rivers.onthenet.as/comments/stellate-ganglion.html stellate ganglion] [http://belong.lowestprices.at/central-illinois.html central illinois brady] [http://sawest.lowestprices.at/lib/think-thank-thunk.html think thank thunk] [http://submersibles.ifrance.com/gratis-poker-online.html gratis poker online] [http://baying.onthenet.as/preteen-lolitas.html preteen lolitas innocent lolitas] [http://submersibles.ifrance.com/norton-virus.html norton anti virus] [http://member.lowestprices.at/article/wahl.html ken wahl] [http://lodden.ifrance.com/furniture-dining.html cheap dining furniture room] [http://irek-loveyou.ifrance.com/hair-care.html hair care] [http://submersibles.ifrance.com/winnie-the-pooh.html winnie the pooh] [http://atomiclife.ifrance.com/html/nike-dunks.html nike dunks] [http://baying.onthenet.as/occupational.html occupational therapy picture] [http://atomiclife.ifrance.com/html/torrent.html torrent file] [http://rivers.onthenet.as/comments/very-faint-line.html very faint line on pregnancy test] [http://belong.lowestprices.at/foyer-lighting.html foyer lighting] [http://rivers.onthenet.as/comments/w-hotels.html w hotel seattle] [http://rivers.onthenet.as/comments/peep-cam.html peep cam] [http://greedy.onthenet.as/lib/p-cutta-street.html p cutta street wars] [http://parson.onthenet.as/le-bourget-france.html le bourget france] [http://baying.onthenet.as/street-bikes.html street bikes] [http://irek-loveyou.ifrance.com/diclofenac-sod.html diclofenac sod] [http://atomiclife.ifrance.com/html/sugar-cookie-recipy.html sugar cookie recipy] [http://greedy.onthenet.as/lib/arlington-national.html arlington cemetery history national]
{{LanguageBar}}
{{wrongtitle|title=logic_relay}}
{{TabsBar|main=s2|base=logic relay}}
==Entity Description==
{{This is a|logical entity|name=logic_relay|sprite=1}}
[[Image:{{PAGENAME}}.png|right]]
{{CD|CLogicRelay|file1=logicrelay.cpp}}
A message forwarder. Fires an [[#Outputs|OnTrigger output]] when triggered, and can be disabled to prevent forwarding outputs.
It is a Output forwarder, which can be used to fire many [[Inputs and Outputs#Outputs|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.


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}}
After a <code>logic_relay</code> 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 with the "Allow fast retrigger" spawnflag.


==Keyvalues==
{{ent|logic_relay}} combines the functionality of {{ent|trigger_relay|game=Half-Life: Source}} and {{ent|multi_manager|game=Half-Life: Source}} from {{goldsrc|2}}. The older entities still exist in {{hls|2}}, but are deprecated.
__NOTOC__
== Keyvalues ==
{{KV Targetname}}
{{KV|Start Disabled|boolean|intn=StartDisabled|When disabled <code>OnTrigger</code> output won't fire}}


* {{kv targetname}}
== Flags ==
{{fl|1|Only trigger once}}
{{fl|2|Allow fast retrigger}}  


* {{kv enabledisable}}
== Inputs ==
{{I|Trigger|param=void|Trigger the relay, causing its OnTrigger output to fire if it is enabled.}}
{{I|Enable|param=void|Allows the relay to fire the OnTrigger outputs after being disabled.}}
{{I|Disable|param=void|Prevents the relay from firing OnTrigger outputs in response to Trigger inputs.}}
{{I|Toggle|param=void|Toggle the relay between enabled and disabled.}}
{{I|CancelPending|param=void|Cancel any events fired by this relay that are currently pending in the I/O event queue
:{{bug|hidetested=1|If the caller of this input is the logic_relay itself it will break the I/O event queue which leads to a crash.}}}}
{{I|EnableRefire|param=void|Automatically fired on a relay after any delayed outputs finish firing, allowing it to fire again.|nofgd=1}}
{{I|TriggerWithParameter|param=variant|only={{mapbase}}|Triggers the relay with a parameter, causing its OnTriggerParameter output to fire if it is enabled.}}


==Flags==
== Outputs ==
{{O|OnSpawn|param=void|ac-is-this=1|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.}}}}
{{O|OnTrigger|param=void|activator = activator of Trigger input|Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.}}
{{O|OnTriggerParameter|param=variant|only={{mapbase}}|activator = activator of TriggerWithParameter input|Fired when the relay is triggered with a parameter. If the relay is set to only trigger once, it will delete itself after firing this output.}}


* 1 : '''Only trigger once''' (Default Checked)
== See Also ==
: If checked, this entity starts on.
* {{ent|logic_case}}
* 2 : '''Allow fast retrigger''' (Default Unchecked)
: Allows fast retriggering.


==Inputs==
[[Category:IO System]]
 
* {{i targetname}}
 
* {{i enabledisable}}
 
* '''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==
 
* {{o targetname}}
 
* '''OnTrigger'''
: Fired when the relay is triggered. {{activator|activator}}
* '''{{ep1 add|OnSpawn}}'''
: Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.
 
[[Category:Entities]]

Latest revision as of 13:24, 7 May 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)
Logic relay.png

logic_relay is a logical entity available in all Source Source games.

C++ Class hierarchy
CLogicRelay
CLogicalEntity
CServerOnlyEntity
CBaseEntity
C++ logicrelay.cpp

It is a Output forwarder, which 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.

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 with the "Allow fast retrigger" spawnflag.

logic_relay combines the functionality of trigger_relay and multi_manager from GoldSrc GoldSrc. The older entities still exist in Half-Life: Source Half-Life: Source, but are deprecated.

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>
When disabled OnTrigger output won't fire

Flags

Only trigger once : [1]
Allow fast retrigger : [2]

Inputs

Trigger <void>
Trigger the relay, causing its OnTrigger output to fire if it is enabled.
Enable <void>
Allows the relay to fire the OnTrigger outputs after being disabled.
Disable <void>
Prevents the relay from firing OnTrigger outputs in response to Trigger inputs.
Toggle <void>
Toggle the relay between enabled and disabled.
CancelPending <void>
Cancel any events fired by this relay that are currently pending in the I/O event queue
Icon-Bug.pngBug:If the caller of this input is the logic_relay itself it will break the I/O event queue which leads to a crash.
EnableRefire <void> !FGD
Automatically fired on a relay after any delayed outputs finish firing, allowing it to fire again.
TriggerWithParameter <variantRedirectInput/variant> (only in Mapbase)
Triggers the relay with a parameter, causing its OnTriggerParameter output to fire if it is enabled.

Outputs

OnSpawn <void>
!activator = !caller = this entity
Fired when the relay is spawned. If the relay is set to only trigger once, it will delete itself after firing this output.
Note.pngNote:Every level load (including save loads!) triggers this output, unless "Fire once only" is checked.
OnTrigger <void>
!activator = activator of Trigger input
!caller = this entity
Fired when the relay is triggered. If the relay is set to only trigger once, it will delete itself after firing this output.
OnTriggerParameter <variantRedirectOutput/variant> (only in Mapbase)
!activator = activator of TriggerWithParameter input
!caller = this entity
Fired when the relay is triggered with a parameter. If the relay is set to only trigger once, it will delete itself after firing this output.

See Also