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
 
(68 intermediate revisions by 33 users not shown)
Line 1: Line 1:
[http://diaper.servemp3.com/mothers-day-cards.htm mothers day cards] [http://perfum.servemp3.com/view/lots-of-fear.html lots of fear] [http://mortar.servemp3.com/content/girls-with-animals.html girls with animals] [http://chopt.servemp3.com/who-was-the.htm who was the oldest president ever elected] [http://marked.servemp3.com/web/vaseline.html vaseline] [http://mortar.servemp3.com/content/wedding-etiquette.html wedding etiquette] [http://safely.servemp3.com/articles/holiday-gift-idea.html holiday gift idea] [http://amamon.servemp3.com/articles/deal.html deal] [http://perfum.servemp3.com/view/movie-porn.html movie porn] [http://toledo.servemp3.com/articles/appareil-photo.html appareil photo numerique olympus] [http://mortar.servemp3.com/content/girl-with-vibrator.html girl with vibrator] [http://whiff.servemp3.com/library/free-mp3-audio.html free mp3 audio books] [http://safely.servemp3.com/articles/john-rogers-blog.html john rogers blog] [http://mortar.servemp3.com/content/beautiful-boy.html beautiful boy] [http://toledo.servemp3.com/articles/excaliber.html excaliber] [http://seeds.servemp3.com/web/soy-candles-wholesale.html soy candles wholesale] [http://diaper.servemp3.com/teen-babes.htm teen babes] [http://marked.servemp3.com/web/black-girls-anal.html black girls anal] [http://mortar.servemp3.com/content/pussy-stretching.html pussy stretching] [http://chopt.servemp3.com/girls-butt.htm girls butt] [http://whiff.servemp3.com/library/roxette-mp3.html roxette mp3] [http://expuls.servemp3.com/web/coleman-generator.html coleman generator] [http://mortar.servemp3.com/content/pokemon-misty-hentai.html pokemon misty hentai gallery] [http://perfum.servemp3.com/view/australian-migration.html australian migration parent] [http://safely.servemp3.com/articles/do-as-infinity.html do as infinity] [http://marked.servemp3.com/web/plasma-monitor.html plasma monitor] [http://perfum.servemp3.com/view/fat-girls.html fat girls] [http://mortar.servemp3.com/content/st-louis-rams-tickets.html st louis rams tickets] [http://whiff.servemp3.com/library/auto-mechanics-geometry.html auto mechanics geometry] [http://safely.servemp3.com/articles/ino.html ino] [http://perfum.servemp3.com/view/barbara-schett.html barbara schett] [http://seeds.servemp3.com/web/oprah-nude.html oprah nude] [http://expuls.servemp3.com/web/my-teacher.html my teacher] [http://perfum.servemp3.com/view/memphis-bleek.html memphis bleek] [http://whiff.servemp3.com/library/thomas-cook.html thomas cook] [http://marked.servemp3.com/web/playstation.html playstation] [http://seeds.servemp3.com/web/tiny-tit-girls.html tiny tit girls] [http://prozak.servemp3.com/text/american-express.htm american express money wire] [http://toledo.servemp3.com/articles/jennifer-lopez.html jennifer lopez pussy] [http://safely.servemp3.com/articles/ancient-roman-gladiators.html ancient roman gladiators] [http://perfum.servemp3.com/view/legal-documents.html legal documents] [http://whiff.servemp3.com/library/dora-the-explorer.html dora the explorer games] [http://mortar.servemp3.com/content/miki.html miki] [http://perfum.servemp3.com/view/love-scent.html love scent] [http://prozak.servemp3.com/text/real-arcade.htm real arcade] [http://seeds.servemp3.com/web/step-bars.html step bars] [http://marked.servemp3.com/web/swim-with-dolphins.html swim with dolphins] [http://expuls.servemp3.com/web/free-family-porn.html free family porn] [http://safely.servemp3.com/articles/terri-clark.html terri clark] [http://whiff.servemp3.com/library/diapering.html diapering] [http://whiff.servemp3.com/library/mp3-converter.html mp3 converter] [http://amamon.servemp3.com/articles/hidden-sex-camera.html hidden sex camera] [http://prozak.servemp3.com/text/belly-button.htm belly button piercings] [http://prozak.servemp3.com/text/woman-masterbation.htm woman masterbation] [http://toledo.servemp3.com/articles/information-on.html information on niagra falls] [http://amamon.servemp3.com/articles/point-of-no-return.html point of no return] [http://marked.servemp3.com/web/korean-tofu.html korean tofu] [http://prozak.servemp3.com/text/oxygen-molecule.htm oxygen molecule structure] [http://mortar.servemp3.com/content/used-race-cars.html used race cars for sale] [http://whiff.servemp3.com/library/building-toys-for.html building toys for kids] [http://perfum.servemp3.com/view/full-moon-wo.html full moon wo sagashite] [http://chopt.servemp3.com/florida-semi-tractor.htm florida semi tractor trailer accident attorneys] [http://seeds.servemp3.com/web/tory-hill.html tory hill] [http://marked.servemp3.com/web/willy-wonka-and.html willy wonka and the chocolate factory] [http://safely.servemp3.com/articles/free-porn-movie.html free porn movie trailer] [http://marked.servemp3.com/web/sexy-black-teens.html sexy black teens] [http://marked.servemp3.com/web/unicycle.html unicycle] [http://expuls.servemp3.com/web/jocks-jacking-off.html jocks jacking off] [http://toledo.servemp3.com/articles/digitizer.html digitizer] [http://amamon.servemp3.com/articles/lingerie-catalog.html lingerie catalog] [http://amamon.servemp3.com/articles/electrical-engineering.html electrical engineering careers] [http://expuls.servemp3.com/web/world-largest.html world largest mega cock] [http://chopt.servemp3.com/split-pussy.htm split pussy] [http://whiff.servemp3.com/library/i-wont-say-im.html i wont say im in love] [http://prozak.servemp3.com/text/tommy-hillfinger.htm tommy hillfinger] [http://mortar.servemp3.com/content/videos-of-girls.html videos of girls wearing thongs] [http://mortar.servemp3.com/content/danica.html danica] [http://perfum.servemp3.com/view/my-friends-hot.html my friends hot mom] [http://chopt.servemp3.com/dogs-licking-pussy.htm dogs licking pussy] [http://mortar.servemp3.com/content/acre.html acre] [http://marked.servemp3.com/web/lesbian-licking.html lesbian licking pussy] [http://safely.servemp3.com/articles/internet-marketing.html internet marketing online advertising] [http://marked.servemp3.com/web/free-porn-video.html free porn video galleries] [http://mortar.servemp3.com/content/nelson-bulletin.html nelson bulletin board] [http://whiff.servemp3.com/library/inces.html inces] [http://safely.servemp3.com/articles/muscle-elegance.html muscle elegance] [http://seeds.servemp3.com/web/everybodys-changing.html everybodys changing] [http://safely.servemp3.com/articles/male-nudists.html male nudists] [http://prozak.servemp3.com/text/childsex.htm childsex] [http://perfum.servemp3.com/view/rfp-or-rfq-and-2005.html rfp or rfq and 2005 and california or ca] [http://perfum.servemp3.com/view/sexy-kitten.html sexy kitten] [http://toledo.servemp3.com/articles/pdr.html pdr] [http://perfum.servemp3.com/view/apartment-leasing.html apartment leasing san antonio] [http://safely.servemp3.com/articles/eating-shit.html eating shit] [http://whiff.servemp3.com/library/hertz-rent-a-car.html hertz rent a car] [http://whiff.servemp3.com/library/candle-gift-basket.html candle gift basket] [http://toledo.servemp3.com/articles/paris-hilton-suck.html paris hilton suck dick] [http://amamon.servemp3.com/articles/leg-freak.html leg freak] [http://perfum.servemp3.com/view/prom.html prom] [http://toledo.servemp3.com/articles/jasmine-aloha.html jasmine aloha]
{{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