User Inputs and Outputs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(why addoutput?)
 
(87 intermediate revisions by 49 users not shown)
Line 1: Line 1:
[http://orel-na-vole.freehostia.com/blog/istituto-per2/ istituto per lo studio e la cura del diabete] [http://orel-na-vole.freehostia.com/blog/idropulitrice-per/ idropulitrice per auto] [http://rasa18.ifrance.com/cella/ cella] [http://orel-na-vole.freehostia.com/blog/video-decapitazione52/ video decapitazione ostaggi americani a] [http://rasa18.ifrance.com/ricieri/ ricieri] [http://nnnslogan.freehostia.com/www-lavatrici2.htm www lavatrici bosh com] [http://orel-na-vole.freehostia.com/blog/peio-hotel/ peio hotel] [http://naughtygirl92.ifrance.com/data/lettore-mp354.html lettore mp3 256 mb creative] [http://orel-na-vole.freehostia.com/blog/imbruglia/ imbruglia] [http://rasa18.ifrance.com/suzuki-3/ suzuki  samurai 19 td cabrio de luxe] [http://orel-na-vole.freehostia.com/blog/villaggio-vacanza22/ villaggio vacanza tulum] [http://orel-na-vole.freehostia.com/blog/la-tarantella2/ la tarantella] [http://rasa18.ifrance.com/lettore-dvd190/ lettore dvd masterizzatore cd combo] [http://rasa18.ifrance.com/dards-d/ dards 3d] [http://naughtygirl92.ifrance.com/data/a-microonde.html a microonde] [http://naughtygirl92.ifrance.com/data/bad-penny.html bad penny] [http://orel-na-vole.freehostia.com/blog/bley-blade/ bley blade] [http://naughtygirl92.ifrance.com/data/immagini-vin.html immagini vin diesel] [http://naughtygirl92.ifrance.com/data/conflitto-di1.html conflitto di classe] [http://orel-na-vole.freehostia.com/blog/concorso-forze/ concorso forze armate] [http://rasa18.ifrance.com/il-diavolo11/ il diavolo in caserma] [http://rasa18.ifrance.com/o-zone125/ o zone numa numa] [http://nnnslogan.freehostia.com/canon-powershot60.htm canon powershot pro1] [http://nnnslogan.freehostia.com/majhong3.htm majhong 2] [http://orel-na-vole.freehostia.com/blog/stylus-photo15/ stylus photo epson stampanti] [http://rasa18.ifrance.com/scilla-gabel/ scilla gabel] [http://orel-na-vole.freehostia.com/blog/palinsesto-televisivo1/ palinsesto televisivo] [http://orel-na-vole.freehostia.com/blog/renzo-zenobi/ renzo zenobi] [http://orel-na-vole.freehostia.com/blog/wrangler5/ wrangler 25] [http://nnnslogan.freehostia.com/beetle-ju.htm beetle ju] [http://rasa18.ifrance.com/maxtor-bp/ maxtor 6b160p0] [http://orel-na-vole.freehostia.com/blog/fotocamera-digitale60/ fotocamera digitale fuji finepix] [http://rasa18.ifrance.com/veline2/ veline 2005] [http://orel-na-vole.freehostia.com/blog/visual-c5/ visual c 2005] [http://naughtygirl92.ifrance.com/data/videoclip-pazza.html videoclip pazza inter] [http://nnnslogan.freehostia.com/tre-madri.htm tre madri] [http://rasa18.ifrance.com/thomas-malory/ thomas malory] [http://orel-na-vole.freehostia.com/blog/si-gira1/ si gira a manhattan] [http://naughtygirl92.ifrance.com/data/mature-blowjob.html mature blowjob] [http://rasa18.ifrance.com/sharp-ad/ sharp ad] [http://nnnslogan.freehostia.com/abercrombie.htm abercrombie] [http://naughtygirl92.ifrance.com/data/cd-jazz.html cd jazz] [http://naughtygirl92.ifrance.com/data/ragazze-russe.html ragazze russe] [http://nnnslogan.freehostia.com/inachus.htm inachus] [http://naughtygirl92.ifrance.com/data/www-shoshan2.html www shoshan] [http://orel-na-vole.freehostia.com/blog/cibo-secco/ cibo secco per gatti] [http://naughtygirl92.ifrance.com/data/la-chamade.html la chamade] [http://nnnslogan.freehostia.com/baggesen-jens.htm baggesen jens immanuel] [http://naughtygirl92.ifrance.com/data/cicli-irregolari.html cicli irregolari] [http://nnnslogan.freehostia.com/revisore-dei.htm revisore dei conti tariffe] [http://rasa18.ifrance.com/portatili-toshiba4/ portatili toshiba satellite] [http://naughtygirl92.ifrance.com/data/santa-maria3.html santa maria del buen ayre mp3] [http://rasa18.ifrance.com/yetisports15/ yetisports] [http://orel-na-vole.freehostia.com/blog/low-profile1/ low profile bracket] [http://orel-na-vole.freehostia.com/blog/foto-piedi10/ foto piedi nudi] [http://orel-na-vole.freehostia.com/blog/nina-miric/ nina miric] [http://rasa18.ifrance.com/sd-cf/ sd cf] [http://orel-na-vole.freehostia.com/blog/goldfrapp-supernature/ goldfrapp supernature] [http://nnnslogan.freehostia.com/sigma-uc.htm sigma uc] [http://rasa18.ifrance.com/gilli-offerte/ gilli offerte] [http://orel-na-vole.freehostia.com/blog/hamlet-access1/ hamlet access point 54mb sw 4p] [http://rasa18.ifrance.com/wieght-watcher/ wieght watcher] [http://nnnslogan.freehostia.com/soundtrack-cindy.htm soundtrack cindy goonies] [http://orel-na-vole.freehostia.com/blog/filumena-marturano/ filumena marturano] [http://naughtygirl92.ifrance.com/data/greek-audio.html greek audio] [http://orel-na-vole.freehostia.com/blog/jeep-veneto/ jeep veneto] [http://naughtygirl92.ifrance.com/data/chat-incontro1.html chat incontro] [http://naughtygirl92.ifrance.com/data/pin-up3.html pin up bikini] [http://orel-na-vole.freehostia.com/blog/bordi-e/ bordi e cornici] [http://nnnslogan.freehostia.com/d-m20.htm d m n 294 2000 d m n 420 2000] [http://naughtygirl92.ifrance.com/data/linda-jarrett.html linda jarrett] [http://naughtygirl92.ifrance.com/data/usb-esterno.html usb esterno disk sata] [http://orel-na-vole.freehostia.com/blog/voli-last6/ voli last minute monastir] [http://nnnslogan.freehostia.com/mp-zen8.htm mp3 zen touch 20 gb] [http://rasa18.ifrance.com/choke/ choke] [http://nnnslogan.freehostia.com/pietroberto.htm pietroberto] [http://naughtygirl92.ifrance.com/data/lettore-mp353.html lettore mp3 256] [http://orel-na-vole.freehostia.com/blog/campeggio-gas/ campeggio gas] [http://rasa18.ifrance.com/testo-ti/ testo ti amo veramente] [http://naughtygirl92.ifrance.com/data/www-itim.html www itim it] [http://nnnslogan.freehostia.com/illuminazione-acquario.htm illuminazione acquario] [http://nnnslogan.freehostia.com/charles-m.htm charles m schulz] [http://nnnslogan.freehostia.com/elettrostimolatore-compex3.htm elettrostimolatore compex body] [http://naughtygirl92.ifrance.com/data/video-musicali19.html video musicali giorgia] [http://nnnslogan.freehostia.com/ricarica-cartuccia8.htm ricarica cartuccia inchiostro] [http://nnnslogan.freehostia.com/sassi.htm sassi] [http://nnnslogan.freehostia.com/doctruyen-com.htm doctruyen com] [http://orel-na-vole.freehostia.com/blog/sbloccare-ev/ sbloccare e616v] [http://naughtygirl92.ifrance.com/data/il-profumo6.html il profumo della notte] [http://orel-na-vole.freehostia.com/blog/hotel-montagna1/ hotel montagna] [http://naughtygirl92.ifrance.com/data/olivia-ruiz.html olivia ruiz] [http://naughtygirl92.ifrance.com/data/thank-you3.html thank you dido] [http://naughtygirl92.ifrance.com/data/driver-sony1.html driver sony dvd rw dw u14a] [http://rasa18.ifrance.com/bad-gastein/ bad gastein] [http://nnnslogan.freehostia.com/codici-titanium2.htm codici titanium] [http://nnnslogan.freehostia.com/ccd-cleaning.htm ccd cleaning] [http://orel-na-vole.freehostia.com/blog/my-best/ my best friend] [http://rasa18.ifrance.com/pagine-gialle7/ pagine gialle terni] [http://naughtygirl92.ifrance.com/data/workstation-hp1.html workstation hp xw4300] [http://naughtygirl92.ifrance.com/data/giochi-java7.html giochi java gratis motorola a835] [http://naughtygirl92.ifrance.com/data/rita-la2.html rita la rossa] [http://orel-na-vole.freehostia.com/blog/drewe-robert/ drewe robert] [http://rasa18.ifrance.com/bloc-mattoncini/ bloc mattoncini] [http://nnnslogan.freehostia.com/circus-fans.htm circus fans] [http://orel-na-vole.freehostia.com/blog/marinai-donne1/ marinai donne e hawaii] [http://naughtygirl92.ifrance.com/data/polenta.html polenta] [http://naughtygirl92.ifrance.com/data/pajero11.html pajero 2005] [http://orel-na-vole.freehostia.com/blog/base-spaziale1/ base spaziale] [http://rasa18.ifrance.com/pavillion-hpcompaq/ pavillion hpcompaq computer] [http://rasa18.ifrance.com/mellin2/ mellin] [http://orel-na-vole.freehostia.com/blog/ferro-da45/ ferro da stiro jura] [http://naughtygirl92.ifrance.com/data/dizionario-cinema.html dizionario cinema americano] [http://naughtygirl92.ifrance.com/data/annunci-trans4.html annunci trans salerno] [http://nnnslogan.freehostia.com/jimi-hendrix14.htm jimi hendrix the dick cavett show] [http://orel-na-vole.freehostia.com/blog/mobile-porta8/ mobile porta dvd] [http://nnnslogan.freehostia.com/silvia-simoni.htm silvia simoni] [http://rasa18.ifrance.com/viewsonic-lcd/ viewsonic lcd 20] [http://rasa18.ifrance.com/jp4/ jp 192] [http://naughtygirl92.ifrance.com/data/startrek-starfleet.html startrek starfleet command 2] [http://nnnslogan.freehostia.com/fogli-sughero.htm fogli sughero] [http://nnnslogan.freehostia.com/zagreb.htm zagreb] [http://orel-na-vole.freehostia.com/blog/lettore-dvd246/ lettore dvd 7] [http://rasa18.ifrance.com/kit-vivavoce25/ kit vivavoce 6610] [http://naughtygirl92.ifrance.com/data/shi-will.html shi will be loved] [http://naughtygirl92.ifrance.com/data/gabry-ponte30.html gabry ponte geordi] [http://orel-na-vole.freehostia.com/blog/video-de114/ video de porno] [http://nnnslogan.freehostia.com/master-blaster2.htm master blaster] [http://nnnslogan.freehostia.com/marmellata-di4.htm marmellata di limoni] [http://naughtygirl92.ifrance.com/data/prodigy-smack.html prodigy smack my bich] [http://nnnslogan.freehostia.com/opel-26.htm opel    omega 20 16v sw class] [http://nnnslogan.freehostia.com/condizionatore-lg1.htm condizionatore lg ah] [http://orel-na-vole.freehostia.com/blog/bluetooth-isdn/ bluetooth isdn] [http://orel-na-vole.freehostia.com/blog/pen-lettore/ pen lettore mp3] [http://naughtygirl92.ifrance.com/data/musica-karaoke.html musica karaoke] [http://rasa18.ifrance.com/ultime-della/ ultime della notte] [http://nnnslogan.freehostia.com/spartiti-di13.htm spartiti di gigi d alessio] [http://nnnslogan.freehostia.com/fotosxxx.htm fotosxxx] [http://naughtygirl92.ifrance.com/data/el-trigo.html el trigo] [http://naughtygirl92.ifrance.com/data/www-condizione.html www condizione donne it] [http://nnnslogan.freehostia.com/citroen-cv3.htm citroen 2cv] [http://nnnslogan.freehostia.com/calogero-passi4.htm calogero passi face a la mer] [http://orel-na-vole.freehostia.com/blog/ram-64/ ram 512 pc3200 cl2] [http://naughtygirl92.ifrance.com/data/differenziale-tecnica.html differenziale (tecnica)] [http://orel-na-vole.freehostia.com/blog/contratto-enti1/ contratto enti locali] [http://rasa18.ifrance.com/lisola-del7/ lisola del dottor frankenstein] [http://rasa18.ifrance.com/padovani/ padovani] [http://rasa18.ifrance.com/www-tg6/ www tg5 com] [http://orel-na-vole.freehostia.com/blog/powershot-s14/ powershot s] [http://orel-na-vole.freehostia.com/blog/megan-gale3/ megan gale calendario] [http://nnnslogan.freehostia.com/www-livestrong.htm www livestrong com] [http://rasa18.ifrance.com/popup-com/ popup com] [http://orel-na-vole.freehostia.com/blog/trucchi-di6/ trucchi di yu gi oh] [http://rasa18.ifrance.com/televisore-39/ televisore 20 pollici] [http://naughtygirl92.ifrance.com/data/xxx-lollypop.html xxx lollypop] [http://nnnslogan.freehostia.com/midland-ricetrasmittenti.htm midland ricetrasmittenti] [http://nnnslogan.freehostia.com/autocad-14.htm autocad 2005 full] [http://rasa18.ifrance.com/sony-gv2/ sony gv d1000] [http://nnnslogan.freehostia.com/tv-panasonic8.htm tv panasonic viera] [http://rasa18.ifrance.com/head-i4/ head i x6] [http://orel-na-vole.freehostia.com/blog/forum-su2/ forum su escort] [http://orel-na-vole.freehostia.com/blog/un-corpo11/ un corpo e un anima dory ghezzi] [http://nnnslogan.freehostia.com/il-muro5.htm il muro di vetro] [http://rasa18.ifrance.com/karaoke-sambame/ karaoke sambame] [http://naughtygirl92.ifrance.com/data/metrica-e.html metrica e poesia del novecento] [http://orel-na-vole.freehostia.com/blog/filanca/ filanca] [http://orel-na-vole.freehostia.com/blog/midi-infantili/ midi infantili] [http://rasa18.ifrance.com/roco-fs/ roco fs] [http://nnnslogan.freehostia.com/b9.htm b 65] [http://orel-na-vole.freehostia.com/blog/gulash/ gulash] [http://nnnslogan.freehostia.com/mondobimbo.htm mondobimbo] [http://rasa18.ifrance.com/sigma-43/ sigma 400 mm nikon obiettivi] [http://orel-na-vole.freehostia.com/blog/disc-stakka/ disc stakka] [http://rasa18.ifrance.com/lettori-mp168/ lettori mp3 2 gb] [http://naughtygirl92.ifrance.com/data/porta-bobine.html porta bobine] [http://naughtygirl92.ifrance.com/data/nagar-khan.html nagar khan] [http://naughtygirl92.ifrance.com/data/multifunzione-canon6.html multifunzione canon mf5770] [http://orel-na-vole.freehostia.com/blog/caracteristicas-de1/ caracteristicas de la omc] [http://naughtygirl92.ifrance.com/data/old-telefon.html old telefon] [http://nnnslogan.freehostia.com/indire.htm indire] [http://orel-na-vole.freehostia.com/blog/fiere-dell/ fiere dell informatica] [http://nnnslogan.freehostia.com/ventola7.htm ventola 12] [http://orel-na-vole.freehostia.com/blog/bitsolution/ bitsolution] [http://orel-na-vole.freehostia.com/blog/comici/ comici] [http://orel-na-vole.freehostia.com/blog/belle-ragazze2/ belle ragazze nude grati] [http://nnnslogan.freehostia.com/audio-usb.htm audio usb scheda] [http://nnnslogan.freehostia.com/telescopi-meade.htm telescopi meade] [http://nnnslogan.freehostia.com/autoloader-dat.htm autoloader dat] [http://nnnslogan.freehostia.com/porta-soffietto.htm porta soffietto] [http://nnnslogan.freehostia.com/memory-card31.htm memory card sony ps2] [http://orel-na-vole.freehostia.com/blog/torture-nude/ torture nude] [http://nnnslogan.freehostia.com/la-spettatrice.htm la spettatrice] [http://nnnslogan.freehostia.com/f-abio.htm f abio e rita] [http://rasa18.ifrance.com/decoder-satellitare9/ decoder satellitare hard] [http://rasa18.ifrance.com/i-don79/ i don t want to wait di paula cole] [http://nnnslogan.freehostia.com/gpsmap-c4.htm gpsmap 172c] [http://orel-na-vole.freehostia.com/blog/luxsuria/ luxsuria] [http://naughtygirl92.ifrance.com/data/palmare-asus6.html palmare asus a620] [http://rasa18.ifrance.com/case-carrelli/ case carrelli appendice] [http://orel-na-vole.freehostia.com/blog/ibanez-vce/ ibanez v70ce] [http://rasa18.ifrance.com/severina-vuckovic9/ severina vuckovic video]
{{LanguageBar}}
The '''FireUser1-4''' inputs and '''OnUser1-4''' outputs are available on every entity that can receive [[Inputs and Outputs]]. This set of controls are specially linked to work together. Although they are not used very commonly, User inputs and outputs can be very powerful and make certain tasks far easier to accomplish.
The '''FireUser1-4''' inputs and '''OnUser1-4''' outputs are available on every entity that can receive [[Inputs_and_Outputs|Inputs and Outputs]].<br>
This set of controls are specially linked to work together. Entities receiving the "FireUserN" input will fire its corresponding "OnUserN" output.<br>
Essentially, "FireUserN" and "OnUserN" are exactly the same as "Trigger" and "OnTrigger" that a [[logic_relay]] has. Except that you have four of them at once, in every single entity, and they work independent and unrelated to each other.<br>
Valve usually uses this to have one entity trigger the same output to multiple entities, while achieving different outcomes every time because each target tells itself what to do.<br>
One could also use it to avoid using logic_relay when the target should be triggered by multiple entities at different times. As each triggering entity directly tells the target to trigger itself.


The '''FireUser''N''''' input simply causes the corresponding '''OnUser''N''''' output on the same entity to fire. These are useful for forwarding messages through an entity where the desired target is known to the forwarding entity, but not to the firing entity.
{{Note|These outputs will fire even on a disabled entity.}}
{{Warning|Using FireUserX via an output that automatically sends a parameter (math_counter's OnGetValue for example) can cause an error and won't fire it properly. That is because FireUserX was coded (possibly by mistake) to accept a string parameter, but the parameter sent by the math_counter is a number. Make sure to specify dummy parameter in such cases.}}


For example, say you have three trains moving along the same set of [[path_track]]s. Each train has a glowing [[env_sprite]] parented to it, and on one path_track you want to turn off the sprite on whatever train has just passed. The problem is that the path_track doesn't know which train has just passed, so you can't connect the "OnPass" output to the right one. So, you solve this by connecting the path_track's "OnPass" output to the <code>[[!activator]]</code> (the train) '''FireUser1''' input, and then connect each train's '''OnUser1''' input to turn off their parented sprite.
==Example - Quicker Workflow==
The map [[d2_coast_08]] contains a [[logic_auto]] that fires the "FireUser1" output to three [[npc_seagull]] entities named "Seagull". Those then trigger themselves to fly to a unique destination, at different times.


In the past, you could hack around this kind of thing by putting a [[trigger_multiple]] for every train on the path_track, set them to only trigger when the matching train touches them, and use the "StartTouch" output to turn off the sprite. Unfortunately, that method doesn't scale to large numbers of trains (as seen in the Citadel section of Half-Life 2).
The logic_auto firing as follows:
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io11.png]] || OnMapSpawn || seagull || FireUser1 || &nbsp; || 0 || No
|}
 
Each of the npc_seagull entities then fire this output, but with different destination name and delay.
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io12.png]] || OnUser1 || [[Targetname#Keywords|!self]] || FlyAway || bird_flightpath_a_48 || 0 || No
|}
 
One may look at this and think this is silly, as every single output would still need to be defined separately and in three different entities no less.<br>
Surely it would have been easier to just name the seagulls unique names and then let the logic_auto tell each bird to fly anywhere. But you'd be wrong. This is faster to build.
 
Without FireUserN, the mapper would need to place multiple birds and take the time to give them all unique names. Then the logic_auto's outputs need to be set up for every bird one after another by setting Targetname and Parameter for the destination.<br>
With FireUserN, the mapper needs to set up one single output in the logic_auto to fire to all bird entities at once because they have the same name. Then set up a single bird with its outputs and copy paste it somewhere else. Since every copy has the same name, it already is targeted by the logic_auto, so all that is needed now is to change the destination name in the parameter field. Which can be done quickly if the mapper doesn't close the parameter window.
 
===Another Example===
The map [[d3_citadel_01]] contains multiple [[func_tracktrain]] (zapperpod1_train) with a [[func_door_rotating]] (zapperpod1_rotator) as a child. The func_tracktrains move along a [[path_track]].<br>
The vmf of this map can be found in "sourcesdk_content\hl2\mapsrc\sdk_d3_citadel_01.vmf".<br>
 
One of the path_track entities, specifically "pod_bay_zapper_track4", the following relevant outputs:
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io12.png]] || OnPass || !activator || Stop ||  || 0.00 || No
|-
| [[File:Io12.png]] || OnPass || !activator || FireUser1 ||  || 0.10 || No
|}
 
Once a func_tracktrain passes this path_track named "pod_bay_zapper_track4", the path_track causes the activator, which in this case are all the func_tracktrains, to stop right there and then fire "FireUser1<br>
Each "func_tracktrain" the following OnUserN outputs:
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io11.png]] || OnUser1 || zapperpod1_rotator || Open ||  || 0.00 || No
|-
| [[File:Io11.png]] || OnUser1 || zapperpod1_rotator || Close ||  || 5.00 || No
|-
| [[File:Io11.png]] || OnUser1 || playerpod1_vehicle|| Open ||  || 1.00 || No
|-
| [[File:Io11.png]] || OnUser1 || playerpod1_vehicle|| Close ||  || 4.00 || No
|}
 
This whole setup essentially tells every single func_tracktrain to stop, turn the pod around and open its doors. Another entity will cause the pod to continue moving, but that is not relevant to this example of User inputs.<br>
This speeds up workflow as well, as the mapper needs to set this up once, and then just rename the target entities by changing the number on them after pasting them multiple times.
 
==Example - Entities triggering themselves==
In some occasions, an entity might be more convenient to trigger itself, rather than having to keep checking on a logic_relay's outputs. One stellar example of that is [[env_tonemap_controller]].<br>
Usually a [[logic_auto]] would set various settings of the tonemap controller on map spawn. But it feels a little backwards to have the env_tonemap_controller be in the map, but all the settings for it are stored somewhere else<br>
So for convenience's sake, one might want a logic_auto that fires "FireUser1" to the env_tonemap_controller, which then fires "OnUser1" to itself for all the things it needs to do.
:{| border=1 cellpadding="2" cellspacing="1"
|- align=left style="background:#DCDCDC; color:black"
!
! My Output > !! Target Entity !! Target Input !! Parameter !! Delay !! Only Once
|-
| [[File:Io12.png]] || OnUser1 || !self || SetTonemapRate || 0.25 || 0.00 || No
|-
| [[File:Io12.png]] || OnUser1 || !self || SetBloomScale|| 0.2 || 0.00 || No
|-
| [[File:Io12.png]] || OnUser1 || !self || SetAutoExposureMin || 0.4 || 0.00 || No
|-
| [[File:Io12.png]] || OnUser1 || !self || SetAutoExposureMax || 1 || 0.00 || No
|}
 
== See also ==
* [[AddOutput]]


[[Category:Level Design]]
[[Category:Level Design]]
[[Category:IO System]]
[[Category:English]]

Latest revision as of 03:50, 26 April 2025

English (en)Русский (ru)中文 (zh)Translate (Translate)

The FireUser1-4 inputs and OnUser1-4 outputs are available on every entity that can receive Inputs and Outputs.
This set of controls are specially linked to work together. Entities receiving the "FireUserN" input will fire its corresponding "OnUserN" output.
Essentially, "FireUserN" and "OnUserN" are exactly the same as "Trigger" and "OnTrigger" that a logic_relay has. Except that you have four of them at once, in every single entity, and they work independent and unrelated to each other.
Valve usually uses this to have one entity trigger the same output to multiple entities, while achieving different outcomes every time because each target tells itself what to do.
One could also use it to avoid using logic_relay when the target should be triggered by multiple entities at different times. As each triggering entity directly tells the target to trigger itself.

Note.pngNote:These outputs will fire even on a disabled entity.
Warning.pngWarning:Using FireUserX via an output that automatically sends a parameter (math_counter's OnGetValue for example) can cause an error and won't fire it properly. That is because FireUserX was coded (possibly by mistake) to accept a string parameter, but the parameter sent by the math_counter is a number. Make sure to specify dummy parameter in such cases.

Example - Quicker Workflow

The map d2_coast_08 contains a logic_auto that fires the "FireUser1" output to three npc_seagull entities named "Seagull". Those then trigger themselves to fly to a unique destination, at different times.

The logic_auto firing as follows:

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnMapSpawn seagull FireUser1   0 No

Each of the npc_seagull entities then fire this output, but with different destination name and delay.

My Output > Target Entity Target Input Parameter Delay Only Once
Io12.png OnUser1 !self FlyAway bird_flightpath_a_48 0 No

One may look at this and think this is silly, as every single output would still need to be defined separately and in three different entities no less.
Surely it would have been easier to just name the seagulls unique names and then let the logic_auto tell each bird to fly anywhere. But you'd be wrong. This is faster to build.

Without FireUserN, the mapper would need to place multiple birds and take the time to give them all unique names. Then the logic_auto's outputs need to be set up for every bird one after another by setting Targetname and Parameter for the destination.
With FireUserN, the mapper needs to set up one single output in the logic_auto to fire to all bird entities at once because they have the same name. Then set up a single bird with its outputs and copy paste it somewhere else. Since every copy has the same name, it already is targeted by the logic_auto, so all that is needed now is to change the destination name in the parameter field. Which can be done quickly if the mapper doesn't close the parameter window.

Another Example

The map d3_citadel_01 contains multiple func_tracktrain (zapperpod1_train) with a func_door_rotating (zapperpod1_rotator) as a child. The func_tracktrains move along a path_track.
The vmf of this map can be found in "sourcesdk_content\hl2\mapsrc\sdk_d3_citadel_01.vmf".

One of the path_track entities, specifically "pod_bay_zapper_track4", the following relevant outputs:

My Output > Target Entity Target Input Parameter Delay Only Once
Io12.png OnPass !activator Stop 0.00 No
Io12.png OnPass !activator FireUser1 0.10 No

Once a func_tracktrain passes this path_track named "pod_bay_zapper_track4", the path_track causes the activator, which in this case are all the func_tracktrains, to stop right there and then fire "FireUser1
Each "func_tracktrain" the following OnUserN outputs:

My Output > Target Entity Target Input Parameter Delay Only Once
Io11.png OnUser1 zapperpod1_rotator Open 0.00 No
Io11.png OnUser1 zapperpod1_rotator Close 5.00 No
Io11.png OnUser1 playerpod1_vehicle Open 1.00 No
Io11.png OnUser1 playerpod1_vehicle Close 4.00 No

This whole setup essentially tells every single func_tracktrain to stop, turn the pod around and open its doors. Another entity will cause the pod to continue moving, but that is not relevant to this example of User inputs.
This speeds up workflow as well, as the mapper needs to set this up once, and then just rename the target entities by changing the number on them after pasting them multiple times.

Example - Entities triggering themselves

In some occasions, an entity might be more convenient to trigger itself, rather than having to keep checking on a logic_relay's outputs. One stellar example of that is env_tonemap_controller.
Usually a logic_auto would set various settings of the tonemap controller on map spawn. But it feels a little backwards to have the env_tonemap_controller be in the map, but all the settings for it are stored somewhere else
So for convenience's sake, one might want a logic_auto that fires "FireUser1" to the env_tonemap_controller, which then fires "OnUser1" to itself for all the things it needs to do.

My Output > Target Entity Target Input Parameter Delay Only Once
Io12.png OnUser1 !self SetTonemapRate 0.25 0.00 No
Io12.png OnUser1 !self SetBloomScale 0.2 0.00 No
Io12.png OnUser1 !self SetAutoExposureMin 0.4 0.00 No
Io12.png OnUser1 !self SetAutoExposureMax 1 0.00 No

See also