User Inputs and Outputs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (trocracbocel)
(why addoutput?)
 
(35 intermediate revisions by 20 users not shown)
Line 1: Line 1:
[http://article-ghost-writer.com/_vti_cnf/logs/cacacaac.html four seasons mp3] [http://jointsolutions.com/hyperion/screenshots/167/inreba.html cake lyrics] [http://nancywarren.com/albums/album03/roltre.html james symington congressman] [http://ajoyousoccasion.net/analog/images/koacfevbu.html chloroformed and drugged girls] [http://gopalace.com/web/page/zarwmonr.html desert animals] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/chiwerko.html tennis uniform] [http://aromasca.org/analog/images/golcnarel.html vevo catalogue builder] [http://jointsolutions.com/hyperion/screenshots/167/foktafad.html mega mobile t tone] [http://gloobaldesign.com/dating/img_original/thumbs/ricaceln.html varig] [http://norcalseahawkers.org/mt-static/images/lang-en-us/pics/elerrac.html loved somebody] [http://mindvision.ro/blog/wp-content/uploads/2007/06/racinfup.html miniature prototypes] [http://mihaidesign.com/work/iahim/php/edit_img/dir777/images/taboetgo.html lagrange multipliers inequality] [http://mge.tv/Files/pics/kosedq.html language spanish toronto training] [http://elivrari.ro/images/themes/enenreet.html shoder org] [http://aromasca.org/analog/images/faetvin.html home addition] [http://aptoschamber.com/data/memberinfo/images/logos/delgetco.html morfa nefyn] [http://communitymusicschool.org/templates_c/images/vifasedze.html racquetball] [http://cluboctane.com/_mm/ct3beta/messaging/users/list/cache/domfue.html hp printer repair] [http://mtnhomeranch.com/analog/stats/quaallas.html treat sunburns] [http://generalmm.ro/cms/e107_files/public/avatars/small/outade.html fiji turtle islands] [http://mindvision.ro/blog/wp-content/uploads/2007/06/bocpas.html planer wood] [http://lawlibrary.org/analog/files/fokbrel.html effexor antidepressants] [http://geniu.org/new/mambots/content/plugins/fokvioude.html algonquin high school ma] [http://cluboctane.com/_mm/ct3beta/messaging/users/list/cache/rackorelv.html tightly bound gagged] [http://nasii.ro/wp-content/uploads/2007/05/qaswtas.html now youre cooking bath maine] [http://ravenswood61.net/guestbook/files/fevcdarn.html south beach diet recipies] [http://igobelin.com/ionutz/e107_files/public/avatars/new/elvarcoch.html remember yesterday skid row lyric] [http://elivrari.ro/images/themes/trrolsit.html forrester] [http://www.3gprebel.com/uploads/photos/thumbs/fazarko.html lorain southview high school] [http://regerengineering.com/includes/languages/english/cache/elteltv.html www babie com] [http://chameleoncreations.com/files/docs/nogets.html moccasins] [http://magicart05.com/lazarusgb/templates/classic/scripts/chigol.html thug holiday] [http://atre.com/analogy/analog3.11/docs/txt/czelbrt.html pop bases] [http://www.hilite.ro/clients/atcer/images/headers/pics/ricfaelzt.html freshman 15] [http://innersolutions.net/oldsecure/orders/files/orvinrc.html stargate series 8 dvd] [http://mcsquared.org/analog/cache/eltfok.html small bra petite aa] [http://nancywarren.com/albums/album03/darcget.html latina] [http://www.3gprebel.com/uploads/photos/thumbs/cochiv.html whistler rental accommodation] [http://ravenswood61.net/guestbook/files/fokpas.html tea leoni gallery] [http://rideshareweek.com/2003-2/version2/brmexpasr.html fiber coupled laser diodes] [http://rideshareweek.com/2003-2/version2/index.html more] [http://ajoyousoccasion.net/analog/images/ricdelge.html lyric to hella nervous by gravy train] [http://ror.com/jacalyn/scripts/cnapasg.html des moines apartments] [http://www.krimket.ro/2suflete/images/users/fotos/pics/brorfok.html anime nurses] [http://geniu.org/new/mambots/content/plugins/noxkose.html humorous] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/entadomre.html buckminster fuller] [http://cluboctane.com/_mm/ct3beta/messaging/users/list/cache/alroinor.html loney housewife] [http://innersolutions.net/oldsecure/orders/files/sagole.html juliet picture play romeo shakespeare] [http://www.easyracers.com/vbb/admin/scripts/index.html url] [http://info-imobiliar.ro/parameters/images/quatrza.html smackdown spoilers 4 7] [http://gloobaldesign.com/dating/img_original/thumbs/altrdevar.html st croix vacation rentals] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/gethen.html patch test allergies] [http://mediatorgroup.ro/admin/templates_c/cache/basplco.html christian ministry] [http://aptoschamber.com/data/memberinfo/images/logos/wgetqasl.html torture comics] [http://norcalseahawkers.org/mt-static/images/lang-en-us/pics/saetra.html transmitor] [http://info-imobiliar.ro/parameters/images/sitemap.html main] [http://mge.tv/Files/pics/index.html url] [http://www.krimket.ro/2suflete/images/users/fotos/pics/varc4td.html indoor games] [http://movingpartspress.com/original/thumbs/cneacelgo.html blighted ovum] [http://mihaidesign.com/work/iahim/php/edit_img/dir777/images/quafevq.html 88 monte carlo for sale] [http://idealtour.ro/main/img_programe/icons/cofamon.html legs.com] [http://nancywarren.com/albums/album03/boellad.html norinchukin bank london] [http://discgolfassoc.com/analog/files/ricete.html 1979 el camino] [http://mcsquared.org/analog/cache/golreco.html face of death] [http://generalmm.ro/cms/e107_files/public/avatars/small/basbasacn.html siemens sl45i review] [http://jointsolutions.com/hyperion/screenshots/167/chirelg.html geek] [http://elivrari.ro/images/themes/xcplboco.html time attendance sheets] [http://mediatorgroup.ro/admin/templates_c/cache/nrercoo.html honda products] [http://maramuresmuzeu.ro/ro/stiri/icons/xmexqaset.html la semana hotel] [http://igobelin.com/ionutz/e107_files/public/avatars/new/domfiqua.html gambling addiction] [http://anatometal.com/catalog/_menuTmb/thumbs/bugbrcaro.html project engineer resumes] [http://anatometal.com/catalog/_menuTmb/thumbs/zvigetd.html aztec people] [http://lawlibrary.org/analog/files/bocboqual.html prince persia walkthrough gamecube] [http://lawlibrary.org/analog/files/acc4tbasd.html boys speedo gallery] [http://jointsolutions.com/hyperion/screenshots/167/laourolch.html petroglyphs western canada] [http://discgolfassoc.com/analog/files/dronnr.html chapped lips] [http://regerengineering.com/includes/languages/english/cache/kofifevwc.html mars news] [http://gloobaldesign.com/dating/img_original/thumbs/bocchisit.html math vocabulary] [http://healthylivingpvtltd.com/images/thumbs/altabrin.html osha guidelines for hiv provention] [http://lovingdoggies.com/dog-sites/temp/images/loboce.html relaxation stress reduction] [http://lawlibrary.org/analog/files/domfokn.html queen victoria empress of] [http://aptoschamber.com/data/memberinfo/images/logos/oulonoc.html officer warrant] [http://chameleoncreations.com/files/docs/wkocabug.html vodavi sts] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/cnaleto.html babes on bikes] [http://idealtour.ro/main/img_programe/icons/alinfidar.html wedding videography danbury ct] [http://lovingdoggies.com/dog-sites/temp/images/sitemap.html website] [http://info-imobiliar.ro/parameters/images/nrtrocenb.html prince agri product] [http://newwaychildbirth.com/store/Products/product/brworro.html dooney purse] [http://mastercarwash.com/UserFiles/File/images/boclor.html ram mount com] [http://nasii.ro/wp-content/uploads/2007/05/bofurobu.html burnt sienna] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/domlolor.html intimate link suggest wear] [http://healthylivingpvtltd.com/images/thumbs/taboczarc.html life living matter really sermon that] [http://elivrari.ro/images/themes/fivarc.html iron curtain water filter] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/sitemap.html webmap] [http://aptoschamber.com/data/memberinfo/images/logos/sitcafic.html kit pillow quilt] [http://www.krimket.ro/2suflete/images/users/fotos/pics/getvifixs.html tibetan terriers] [http://gloobaldesign.com/dating/img_original/thumbs/etsedvarf.html x rated picture] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/index.html www] [http://ror.com/jacalyn/scripts/index.html top] [http://powerhousemedia.net/analog/images/dedomcmon.html ice maker hookup] [http://mastercarwash.com/UserFiles/File/images/nrpasmext.html mpi reviews testimonials] [http://ravenswood61.net/guestbook/files/trvivit.html lavasoft] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/nrdedar.html potassium oxalate] [http://aptoschamber.com/data/memberinfo/images/logos/enbasref.html the reformation] [http://lawlibrary.org/analog/files/erdronerf.html angel sanctuary gallery] [http://generalmm.ro/cms/e107_files/public/avatars/small/enacel.html chesapeake real estate] [http://mihaidesign.com/work/iahim/php/edit_img/dir777/images/sitemap.html website] [http://igobelin.com/ionutz/e107_files/public/avatars/new/index.html web] [http://mge.tv/Files/pics/casarel.html present] [http://ajoyousoccasion.net/analog/images/elttalet.html michelle lee] [http://cluboctane.com/_mm/ct3beta/messaging/users/list/cache/dronfevne.html lightening] [http://magicart05.com/lazarusgb/templates/classic/scripts/zchieltn.html jesus maria cordoba] [http://www.3gprebel.com/uploads/photos/thumbs/sitemap.html site] [http://rideshareweek.com/2003-2/version2/bugbobr.html area code listing] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/rebrricp.html cat gifts] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/cnapasvar.html fayetteville ar real estate] [http://fotografulmeu.ro/gallery/images/lilitaoue.html buy computer] [http://gopalace.com/web/page/qasdar.html wastewater] [http://www.mambodyssee.com/wp-content/uploads/2007/10/ermexkor.html www.abebooks.com] [http://nasii.ro/wp-content/uploads/2007/05/brcaba.html anal free pic sex xxx] [http://mge.tv/Files/pics/rodetroc.html wheel chocks] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/zneinplb.html stone lake howard county maryland] [http://lawlibrary.org/analog/files/zelcaolo.html natural science industries rock tumbler] [http://lawlibrary.org/analog/files/quamonc.html save me queen lyrics] [http://mastercarwash.com/UserFiles/File/images/orxlanrc.html nanometer to meter conversion] [http://mindvision.ro/blog/wp-content/uploads/2007/06/deletz.html sex movies for free] [http://ajoyousoccasion.net/analog/images/trocbugd.html mxr omni] [http://anatometal.com/catalog/_menuTmb/thumbs/index.html index] [http://mediatorgroup.ro/admin/templates_c/cache/sitemap.html domain] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/alquadel.html meta optimization] [http://innersolutions.net/oldsecure/orders/files/erbugenq.html half light] [http://www.duanbiz.ro/director/temp/images/hencal.html royalty free stock video] [http://norcalseahawkers.org/mt-static/images/lang-en-us/pics/oloboc.html dmx lighting] [http://mateonline.net/anunturi/coperti/poza/orgolfo.html pekingese dogs] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/henrolgo.html lewis drug sioux falls south dakota] [http://chameleoncreations.com/files/docs/bocnef.html locate us government drug repossed homes] [http://mcsquared.org/analog/cache/zartac.html nyc property values] [http://mge.tv/Files/pics/sedboinro.html kimberley klub broome] [http://atre.com/analogy/analog3.11/docs/txt/inviva.html mocking bird] [http://ajoyousoccasion.net/analog/images/chicaneca.html weather in modesto ca] [http://gloobaldesign.com/dating/img_original/thumbs/sazdro.html syracuse china] [http://healthylivingpvtltd.com/images/thumbs/sedlid.html new cars on line] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/dronelxl.html liliana] [http://ror.com/jacalyn/scripts/coreldr.html 91fm india] [http://lovingdoggies.com/dog-sites/temp/images/oreltac.html redwood credit union] [http://ror.com/jacalyn/scripts/coermonlo.html jesus christ superstar] [http://nancywarren.com/albums/album03/bozarbasz.html elementary art education] [http://www.krimket.ro/2suflete/images/users/fotos/pics/bofoken.html portsmouth city council website] [http://class-marriage.ro/galerie/includes/scripts/php/roc4twvar.html beachfront homes] [http://www.krimket.ro/2suflete/images/users/fotos/pics/cnaacfo.html southern ca indian casino] [http://nancywarren.com/albums/album03/index.html link] [http://lawlibrary.org/analog/files/racoufua.html terri hatcher jpg] [http://info-imobiliar.ro/parameters/images/requab.html come together] [http://elivrari.ro/images/themes/dronsitri.html northwest passage] [http://chameleoncreations.com/files/docs/varfuneo.html hydropath technology] [http://info-imobiliar.ro/parameters/images/koinkofi.html natural fertility herbs] [http://mindvision.ro/blog/wp-content/uploads/2007/06/relcna.html would you hit this.com] [http://regerengineering.com/includes/languages/english/cache/sitemap.html webmap] [http://mcsquared.org/analog/cache/zeldarca.html new sims2 clothes] [http://luncamuresului.ro/forum/e107_plugins/log/logs/logi/varetb.html wall wart remover] [http://ajoyousoccasion.net/analog/images/boacxqase.html berlin wall] [http://article-ghost-writer.com/_vti_cnf/logs/erqaslor.html lottery notes] [http://boltofnevada.com/guestbook/files/losedrol.html us census] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/relazarb.html county search] [http://lawlibrary.org/analog/files/nrfireld.html modular synthesizer kit] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/sitemap.html webmap] [http://powerhousemedia.net/analog/images/getfev.html alcohol canada statistics] [http://aptoschamber.com/data/memberinfo/images/logos/quafudeli.html kids birthday gifts inland empire] [http://boltofnevada.com/guestbook/files/rolsed.html atlantic city guide visitor] [http://nasii.ro/wp-content/uploads/2007/05/remexre.html verizen] [http://chameleoncreations.com/files/docs/acelzarco.html macintosh computers] [http://anatometal.com/catalog/_menuTmb/thumbs/delbrbrse.html eagle rock california hotels] [http://mindvision.ro/blog/wp-content/uploads/2007/06/cacboco.html taurus tattoos] [http://ravenswood61.net/guestbook/files/elnodel.html crystal western belts] [http://gloobaldesign.com/dating/img_original/thumbs/loqasd.html inthevip club life] [http://ajoyousoccasion.net/analog/images/orzdrons.html liadro] [http://discgolfassoc.com/analog/files/neworgole.html jazzy jeff] [http://newwaychildbirth.com/store/Products/product/enouge.html asuka chiaki] [http://atre.com/analogy/analog3.11/docs/txt/quanekof.html timbren] [http://www.3gprebel.com/uploads/photos/thumbs/sitbrget.html maine power of attorney] [http://generalmm.ro/cms/e107_files/public/avatars/small/inaldomtr.html synedit 2.4] [http://www.easyracers.com/vbb/admin/scripts/index.html website] [http://mastercarwash.com/UserFiles/File/images/faleto.html project risk management] [http://mindvision.ro/blog/wp-content/uploads/2007/06/baselsa.html schwab.com] [http://igobelin.com/ionutz/e107_files/public/avatars/new/inroquae.html northern illinois university] [http://ror.com/jacalyn/scripts/pasqase.html quitting coffee] [http://igobelin.com/ionutz/e107_files/public/avatars/new/rictanr.html frozen shipping] [http://www.easyracers.com/vbb/admin/scripts/index.html http] [http://www.easyracers.com/vbb/admin/scripts/sitemap.html webmap] [http://ludusonline.net/test/libraries/joomla/utilities/compat/notes/quaplkof.html wamsutta] [http://atre.com/analogy/analog3.11/docs/txt/fevolo.html atv hong kong world] [http://innersolutions.net/oldsecure/orders/files/sitmonbrr.html wedding video connecticut] [http://mge.tv/Files/pics/trocplac.html free oral sex movies] [http://atre.com/analogy/analog3.11/docs/txt/sitemap.html http] [http://newwaychildbirth.com/store/Products/product/trneeltr.html portland] [http://foodandbar.ro/pharma/blog/wp-content/uploads/2007/11/rechiza.html psp with games] [http://aromasca.org/analog/images/relbrn.html air berlin] [http://mateonline.net/anunturi/coperti/poza/getvarcoo.html ttt] [http://movingpartspress.com/original/thumbs/orrelb.html le montage function centre sydney] [http://gopalace.com/web/page/sitemap.html here]
{{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 "OnStartTouch" 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