User Inputs and Outputs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(why addoutput?)
 
(75 intermediate revisions by 45 users not shown)
Line 1: Line 1:
[http://black-dead.6te.net/data/learn-to/ learn to masturbate] [http://lurzgri.hostinggratisargentina.com/directory/elisa-cuthbert/ elisa cuthbert] [http://readingredhead.myxhost.com/law-firm.html law firm] [http://dirtmonk.hostinggratischile.com/view/adult-lifestyle/ adult lifestyle sites] [http://touchya.xlx.pl/resources/a-buddha.html a buddha statue] [http://www.volny.cz/o0maybelle0o/directory/cute-teenagers.html cute teenagers] [http://touchya.xlx.pl/resources/aerobic-and.html aerobic and anaerobic bacteria] [http://www.volny.cz/o0maybelle0o/directory/liftmaster-garage.html liftmaster garage door opener] [http://silivraur.myxhost.com/resources/cum-facial.html cum facial black] [http://thbruner.ueuo.com/content/see-thru.html see thru panties] [http://cockr.hostinggratisargentina.com/topic/portal-data/ portal data] [http://www.volny.cz/reabhecc/content/saddle-pads.html saddle pads] [http://monkeyd.hostinggratischile.com/library/saddam-hussein.html saddam hussein] [http://coquarle.orgfree.com/poop-porn.html poop porn] [http://touchya.xlx.pl/resources/free-celebrity.html free celebrity nude pictures] [http://juliusjunkie.w8w.pl/blog/young-sluts/ young sluts] [http://readingredhead.myxhost.com/adult-free.html adult free] [http://wooff.xlx.pl/library/metre-ruler.html metre ruler] [http://l-z.3-hosting.net/web/hot-naked/ hot naked teens] [http://monkeydarren.getenjoyment.net/styles/girl-gaining.html girl gaining weight stories] [http://readingredhead.myxhost.com/jennifer-love.html jennifer love hewit] [http://kat9i-95.orgfree.com/library/lesbian-hentai.html lesbian hentai] [http://wooff.xlx.pl/library/pokemon-yaoi.html pokemon yaoi] [http://www.volny.cz/zinjadu/description/dialogics/ dialogics] [http://cockr.hostinggratisargentina.com/topic/mercruiser-parts/ mercruiser parts] [http://readingredhead.myxhost.com/erotic-cartoons.html erotic cartoons] [http://lurzgri.hostinggratisargentina.com/directory/california-dream/ california dream girls] [http://touchya.xlx.pl/resources/sainte-baume.html sainte baume france] [http://klwebb.ueuo.com/lib/rainbow-connection/ rainbow connection] [http://wooff.xlx.pl/library/spankingonline.html spankingonline] [http://klwebb.ueuo.com/lib/sedu-hair/ sedu hair of straighteners] [http://www.volny.cz/o0maybelle0o/directory/free-masterbation.html free masterbation techniques] [http://miss-cris.3-hosting.net/view/chaco-sandals/ chaco sandals] [http://www.volny.cz/o0maybelle0o/directory/body-paint.html body paint] [http://silivrour.hostinggratisargentina.com/lib/jeep-compass.html jeep compass] [http://sultryshanny.w8w.pl/topic/look-other/ look other people space] [http://black-dead.6te.net/data/rate-my/ rate my teacher] [http://miss-cris.3-hosting.net/view/mexican-blowjob/ mexican blowjob] [http://monkeydarren.getenjoyment.net/styles/boy-girl.html boy girl beautiful dress sissy] [http://hihallei.ueuo.com/resources/magnetism.html magnetism] [http://kat9i-95.orgfree.com/library/girl-strip.html girl strip tease] [http://silivraur.myxhost.com/resources/male-sex.html male sex stimulant] [http://monkeyd.hostinggratischile.com/library/days-of.html days of our lives] [http://sultryshanny.w8w.pl/topic/jennifer-tilly/ jennifer tilly naked] [http://coquarle.orgfree.com/parker-hannifin.html parker hannifin] [http://www.volny.cz/zinjadu/description/liliaceae/ liliaceae] [http://krakozyabrik.load4.net/small/source.html source] [http://cockroailler.myxhost.com/text/ucc/ ucc] [http://silivraur.myxhost.com/resources/free-dvd.html free dvd porn] [http://l-z.3-hosting.net/web/cherry-in/ cherry in vagina] [http://enproffi.orgfree.com/web/old-age.html old age pussy] [http://krakozyabrik.load4.net/small/kara-monaco.html kara monaco nude] [http://thbruner.ueuo.com/content/turks-and.html turks and caicos] [http://buycommiewildly.6te.net/lib/anthony-book/ anthony book pier] [http://dirtmonk.hostinggratischile.com/view/ls-magazine/ ls magazine girl models] [http://wooff.xlx.pl/library/garage-organizers.html garage organizers] [http://thbruner.ueuo.com/content/ultracet.html ultracet] [http://cockr.hostinggratisargentina.com/topic/cum-wife/ cum wife] [http://l-z.3-hosting.net/web/gallery-magazine/ gallery magazine girl next door] [http://silivraur.myxhost.com/resources/women-in.html women in wet panties] [http://zinjadu.dublu.org/new/famous-clowns/ famous clowns] [http://juliusjunkie.w8w.pl/blog/free-huge/ free huge cock gallery] [http://kat9i-95.orgfree.com/library/indiana-state.html indiana state university] [http://touchya.xlx.pl/resources/redhead-nude.html redhead nude thumbnails] [http://princezz.hostinggratisargentina.com/html/automobile-bill.html automobile bill free sale] [http://sturuntsev.prv.pl/directory/lake-louise.html lake louise] [http://monkeyd.hostinggratischile.com/library/november-rain.html november rain] [http://loozers.hostinggratischile.com/html/alternative-slatwall/ alternative slatwall] [http://dirtmonk.hostinggratischile.com/view/hootie-and/ hootie and the blowfish] [http://hihallei.ueuo.com/resources/hypoallergenic.html hypoallergenic] [http://loozers.hostinggratischile.com/html/mary-carey/ mary carey nude] [http://princezz.hostinggratisargentina.com/html/young-cocksuckers.html young cocksuckers] [http://coquarle.orgfree.com/arabic-music.html arabic music] [http://miss-cris.3-hosting.net/view/pokemon-pics/ pokemon pics] [http://krakozyabrik.load4.net/small/brand.html brand] [http://tokman.3-hosting.net/lib/dark-shadows/ dark shadows] [http://silivraur.myxhost.com/resources/firsttime-home.html firsttime home buyer grants] [http://silivraur.myxhost.com/resources/sex-forums.html sex forums] [http://zinjadu.dublu.org/new/stephanie-mcmahon/ stephanie mcmahon] [http://miss-cris.3-hosting.net/view/hitchhiker/ hitchhiker] [http://krakozyabrik.load4.net/small/heel-spurs.html heel spurs] [http://miss-cris.3-hosting.net/view/crusty-demons/ crusty demons] [http://mariaklara.prv.pl/data/pussy-thumbs.html pussy thumbs] [http://cockroailler.myxhost.com/text/geo-tracker/ geo tracker] [http://dirtmonk.hostinggratischile.com/view/superman-sex/ superman sex] [http://enproffi.orgfree.com/web/roller-coasters.html roller coasters of the future] [http://thbruner.ueuo.com/content/fuse-tv.html fuse tv] [http://sturuntsev.prv.pl/directory/fawn.html fawn] [http://mariaklara.prv.pl/data/lexmark-toner.html lexmark toner cartridge] [http://black-dead.6te.net/data/rapid-prototyping/ rapid prototyping medical applications] [http://zinjadu.dublu.org/new/desktop-wall/ desktop wall paper] [http://touchya.xlx.pl/resources/yamaha-r.html yamaha r6] [http://silivraur.myxhost.com/resources/journals.html journals] [http://wooff.xlx.pl/library/sex-video.html sex video] [http://coquarle.orgfree.com/missouri-home.html missouri home builders directory] [http://mariaklara.prv.pl/data/mcafee.html mcafee] [http://monkeydarren.getenjoyment.net/styles/montana-deer.html montana deer hunting] [http://sultryshanny.w8w.pl/topic/search/ search] [http://krakozyabrik.load4.net/small/drivers-ed.html drivers ed] [http://hihallei.ueuo.com/resources/lesbian-bath.html lesbian bath] [http://promox.marte.ro/jo/media/video/axrcac.html male to female transsexual personal page] [http://promox.marte.ro/jo/media/video/bdhtle.html kids fighting] [http://barra.hu/css/gvvdnl.html neutral detergents] [http://nightflyer.marte.ro/albums/userpics/thumb/skdfrs.html locked up mp3] [http://www.loyno.edu/~probono/paperwork/pdf_files/dxkahq.html buy hoodia] [http://barra.hu/css/lhevmr.html william milligan] [http://promox.marte.ro/jo/media/video/pidbfk.html constantinople] [http://onlinemarketing.sufx.net/twatch/tmp/tuqdaj.html cyclobenzaprine] [http://barra.hu/css/lpkwac.html asp news] [http://barra.hu/css/pmbthf.html mary poppins london show] [http://beleakpe.marte.ro/phpBB/images/avatars/img/pbddix.html heather spytek] [http://mzd.marte.ro/osvs/galerie/thumbs/cache/khwdbv.html small investment banking firms] [http://host.sapte.ro/support/images/avatars/small/xtlken.html father preteen daughter have sex] [http://kilometrul.sapte.ro/dw/m/picture/cache/dvwlrq.html buy azithromycin] [http://barra.hu/css/jppqdp.html aluminum tool boxes] [http://nightflyer.marte.ro/albums/userpics/thumb/khrqnq.html bus conversions] [http://blog-de-pe.marte.ro/wp-content/wp-photos/photo/bemhrl.html dungeons] [http://kilometrul.sapte.ro/dw/m/picture/cache/eugstk.html ultracet] [http://host.sapte.ro/support/images/avatars/small/oxxmsh.html homely] [http://elitesite.sufx.net/e107_files/public/avatars/small/xmcjqi.html cellphone ringtones] [http://pariurionline.sapte.ro/images/photoalbum/photo/ksbste.html free ericsson ringtones] [http://alsclan.sufx.net/e107_themes/lamb/video/dlwdcm.html discount adderall] [http://cybernet.sufx.net/routing/skins/images/pics/gfudmo.html buy carisoprodol] [http://www.loyno.edu/~snkashis/autoviewer/images/2007-10-01/hgvuxm.html tramadol online] [http://liquid.sapte.ro/images/Thumbs/cpbkcf.html real ringtone] [http://mzd.marte.ro/osvs/galerie/thumbs/cache/lqmijl.html texas hunting] [http://cybernet.sufx.net/routing/skins/images/pics/aiqssk.html used bmw auto] [http://promox.marte.ro/jo/media/video/ogbcxc.html mandarin hotel bangkok thailand] [http://nightflyer.marte.ro/albums/userpics/thumb/lnmlxn.html jimmie johnson] [http://nightflyer.marte.ro/albums/userpics/thumb/ebhroj.html braless babe] [http://psycho.marte.ro/cod/cod/hxrrtk.html in ground swimming pools] [http://krll.sapte.ro/xxx/errors_log/mahdfp.html xanax online] [http://mzd.marte.ro/osvs/galerie/thumbs/cache/tqckdx.html johnson] [http://krll.sapte.ro/xxx/errors_log/wpmkti.html order didrex] [http://zo00om.sapte.ro/files/cache/pvnmxc.html kate chopin] [http://mzd.marte.ro/osvs/galerie/thumbs/cache/ldbdoc.html chastity] [http://microlink.sufx.net/cache/Language/vqedlw.html bmw car] [http://best.sapte.ro/albums/ftp3/thumb/vnfkdi.html sildenafil online] [http://nightflyer.marte.ro/albums/userpics/thumb/oamhtx.html gyno gallery] [http://samax.sufx.net/wp-content/themes/royale/images/icons/akhdcu.html sprint ringtones] [http://blog-de-pe.marte.ro/wp-content/wp-photos/photo/httkud.html business holiday cards] [http://kilometrul.sapte.ro/dw/m/picture/cache/dgchju.html lotrel online] [http://barra.hu/css/alvjdg.html public information display system] [http://zo00om.sapte.ro/files/cache/vamgdb.html oklahoma university] [http://barra.hu/css/oqcxit.html serre jardin] [http://zo00om.sapte.ro/files/cache/bdafhx.html yale university statistics department] [http://www.loyno.edu/~probono/paperwork/pdf_files/ojlxhs.html ritalin] [http://mp3hits.sufx.net/images/photogallery/photo/tfxrni.html toques ringtones] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/lasfix.html anime dragonball z xxx] [http://barra.hu/css/ojskae.html nobody knows true story] [http://psycho.marte.ro/cod/cod/ggtlwf.html free oral sex movie] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/kpfmeg.html mari misato] [http://barra.hu/css/diqncs.html ru side story west] [http://elitesite.sufx.net/e107_files/public/avatars/small/qcxghb.html download sexy ringtones] [http://freeadult.sapte.ro/Mature-porn/thumb/gihkqr.html protonix online] [http://americanconquest.sufx.net/php-files/images/news/tmp/lotoou.html phone ringtone] [http://sursa.sapte.ro/images/avatars/small/cdfkcp.html land of odd] [http://elitesite.sufx.net/e107_files/public/avatars/small/tjmokp.html free mono ringtones] [http://host.sapte.ro/support/images/avatars/small/pqfenj.html candid beach teen] [http://psycho.marte.ro/cod/cod/uepnmr.html stripping girl] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/ekhosq.html vacation cabins] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/ehaxri.html bonnie] [http://microlink.sufx.net/cache/Language/gvwqne.html buy xanax] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/hxrres.html hosting cheap package web] [http://moa.sapte.ro/albums/Desene/Sexe/thumb/cekdoj.html uncensored girlsgonewild] [http://psycho.marte.ro/cod/cod/fbvxfo.html ultimate fighter] [http://beleakpe.marte.ro/phpBB/images/avatars/img/omfmtw.html tfc] [http://psycho.marte.ro/cod/cod/bdnpaa.html epilepsy] [http://redbullet.sufx.net/images/avatars/small/ofrtuk.html levitra online] [http://gguild.sufx.net/forum/cache/tpl/ulhnhm.html cialis online] [http://www.loyno.edu/~snkashis/autoviewer/images/2007-10-01/ljmlmo.html free monophonic ringtones] [http://cnmv.sapte.ro/smilies/msn/ahwhpv.html girls sucking penis] [http://gguild.sufx.net/forum/cache/tpl/eppvwd.html order alprazolam] [http://promox.marte.ro/jo/media/video/kcinll.html impala parts] [http://psycho.marte.ro/cod/cod/ulplnb.html new mobile phones nokia] [http://gguild.sufx.net/forum/cache/tpl/migcem.html order carisoprodol] [http://promox.marte.ro/jo/media/video/grqqrq.html object oriented code] [http://sursa.sapte.ro/images/avatars/small/bvfnje.html sexy stripping] [http://host.sapte.ro/support/images/avatars/small/croxtw.html free genealogy] [http://zo00om.sapte.ro/files/cache/gwxpex.html ameriplan business] [http://cybernet.sufx.net/routing/skins/images/pics/oahfda.html cheap dianabol] [http://mp3hits.sufx.net/images/photogallery/photo/vgtqtg.html americanairlines] [http://promox.marte.ro/jo/media/video/pjftmj.html darkstalkers hentai] [http://liquid.sapte.ro/images/Thumbs/dnnpow.html dianabol online] [http://bancuri.marte.ro/jokepics/images/ihvjis.html atlantic city guide visitor] [http://www.loyno.edu/~gcnfj/UserFiles/File/tmp/dcrfrj.html sonyericsson ringtones] [http://www.loyno.edu/~probono/paperwork/pdf_files/kimcqp.html norco] [http://cnmv.sapte.ro/smilies/msn/ovgbdo.html boys caught masturbating] [http://barra.hu/css/dfchlp.html impact prospects] [http://rdslink.sufx.net/cache/tmp/vnxuts.html buy hydrocodone] [http://psycho.marte.ro/cod/cod/pxscnx.html sex guides] [http://nightflyer.marte.ro/albums/userpics/thumb/nxnapq.html install software windows xp] [http://onlinemarketing.sufx.net/twatch/tmp/nvmikm.html funny ringtone] [http://psycho.marte.ro/cod/cod/bnjjcf.html cram] [http://liquid.sapte.ro/images/Thumbs/ugxvoa.html order clonazepam] [http://barra.hu/css/jvdmoh.html rush limbaugh radio online] [http://psycho.marte.ro/cod/cod/emnutn.html great wolf lodge] [http://alsclan.sufx.net/e107_themes/lamb/video/temgxn.html qwest ringtone] [http://samax.sufx.net/wp-content/themes/royale/images/icons/tswjsc.html free sony ringtones] [http://pirate.sufx.net/gallery/files/cache/wrdqci.html discount diethylpropion]
{{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