User Inputs and Outputs: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(why addoutput?)
 
(67 intermediate revisions by 42 users not shown)
Line 1: Line 1:
[http://web.archive.org/20071205143121/http://internet-tv.overwell.info/ internet tv] [http://web.archive.org/web/20071205142235/http://professional.pyknic.info/ professional wrestling] [http://web.archive.org/web/20071205142235/http://romantic-love.leonite.info/ romantic love poem] [http://web.archive.org/web/20071205142235/success-magazine.surfle.info/ success magazine investor workshop] [http://web.archive.org/web/20071205142235/http://facial-skin-care.diadrome.info/ facial skin care] [http://activity-centres.pyknic.info/ activity centres in wales] [http://web.archive.org/web/20071205142235/http://holly-madison.diadrome.info/ holly madison] [http://web.archive.org/20071205143121/http://us-action-replay.overwell.info/ us action replay] [http://web.archive.org/web/20071205142235/http://phunk-with-my.diadrome.info/ phunk with my heart] [http://web.archive.org/web/20071205142235/http://male-masturbation.pyknic.info/ male masturbation stories] [http://web.archive.org/20071205143121/hentai-bondage.strontic.info/ hentai bondage] [http://mouvement-quebecois.overwell.info/ mouvement quebecois qualite] [http://web.archive.org/20071205143121/whats-my-ip.strontic.info/ whats my ip] [http://web.archive.org/20071205143121/slip-and-slide.strontic.info/ slip and slide] [http://web.archive.org/web/20071205142235/http://atlanta-apple.lovich.info/ atlanta apple reseller] [http://web.archive.org/web/20071205142235/http://great-adventure.diadrome.info/ great adventure] [http://web.archive.org/20071205143121/rhiannon.strontic.info/ rhiannon] [http://web.archive.org/web/20071205142235/http://virgin-mobile.leonite.info/ virgin mobile plan] [http://web.archive.org/20071205143121/girl-wallpapers.strontic.info/ girl wallpapers] [http://web.archive.org/web/20071205142235/http://carrie-otis.leonite.info/ carrie otis] [http://web.archive.org/20071205143121/http://milwaukee-public.overwell.info/ milwaukee public museum] [http://web.archive.org/web/20071205142235/http://home-financing.pyknic.info/ home financing] [http://web.archive.org/web/20071205142235/florida-key-offshore.surfle.info/ florida key offshore fishing] [http://web.archive.org/web/20071205142235/http://anal-sex-with-my.leonite.info/ anal sex with my wife] [http://mysextour.overwell.info/ mysextour] [http://web.archive.org/20071205143121/http://fat-black-lesbians.pinelike.info/ fat black lesbians] [http://web.archive.org/20071205143121/http://gothic-anime.cubrun.info/ gothic anime] [http://web.archive.org/web/20071205142235/http://carquest.lovich.info/ carquest] [http://web.archive.org/web/20071205142235/http://thirdplace-books.lovich.info/ thirdplace books] [http://web.archive.org/20071205143121/http://diesel-cars.overwell.info/ diesel cars] [http://web.archive.org/web/20071205142235/http://sample-porn-movies.leonite.info/ sample porn movies] [http://web.archive.org/web/20071205142235/http://oral-cumshot.pyknic.info/ oral cumshot] [http://web.archive.org/20071205143121/http://flashget.topkick.info/ flashget] [http://web.archive.org/20071205143121/teen-titans-manga.strontic.info/ teen titans manga] [http://web.archive.org/web/20071205142235/http://dominant-wives.leonite.info/ dominant wives] [http://web.archive.org/20071205143121/judy-jetson.strontic.info/ judy jetson] [http://web.archive.org/web/20071205142235/http://sapphic-extreme.pyknic.info/ sapphic extreme movies] [http://web.archive.org/web/20071205142235/http://tobrex.pyknic.info/ tobrex] [http://web.archive.org/web/20071205142235/http://blighted-ovum.diadrome.info/ blighted ovum] [http://web.archive.org/20071205143121/http://bounce-out-game.cubrun.info/ bounce out game at gamehouse] [http://web.archive.org/20071205143121/http://my-cunt.overwell.info/ my cunt] [http://web.archive.org/web/20071205142235/http://state-of-california.leonite.info/ state of california labor code] [http://web.archive.org/web/20071205142235/http://basenji.leonite.info/ basenji] [http://web.archive.org/20071205143121/sex-while-pregnant.strontic.info/ sex while pregnant] [http://web.archive.org/20071205143121/http://kitana-jade.topkick.info/ kitana jade] [http://professional.pyknic.info/ professional wrestling] [http://country-music-ringtone.leonite.info/ country music ringtone] [http://web.archive.org/20071205143121/http://webcam-girls.overwell.info/ webcam girls teasing] [http://web.archive.org/web/20071205142235/http://prank-calls.lovich.info/ prank calls] [http://web.archive.org/web/20071205142235/http://sapphire-ring.leonite.info/ sapphire ring] [http://web.archive.org/20071205143121/http://nina-hartley.cubrun.info/ nina hartley anal] [http://web.archive.org/20071205143121/http://frontal.pinelike.info/ frontal] [http://web.archive.org/web/20071205142235/http://pictures-of-bridesmaids.lovich.info/ pictures of bridesmaids gowns] [http://hot-pussy-pic.overwell.info/ hot pussy pic free] [http://web.archive.org/20071205143121/http://senior-thesis.cubrun.info/ senior thesis idea] [http://kellybluebook.overwell.info/ kellybluebook] [http://web.archive.org/20071205143121/magnitude-of-a-complex.strontic.info/ magnitude of a complex number] [http://web.archive.org/web/20071205142235/http://asian-schoolgirl.diadrome.info/ asian schoolgirl upskirt] [http://mom-poems.overwell.info/ mom poems] [http://web.archive.org/20071205143121/http://ducklings.pinelike.info/ ducklings] [http://web.archive.org/web/20071205142235/shimmer.surfle.info/ shimmer] [http://web.archive.org/web/20071205142235/http://midget-sex-midget.pyknic.info/ midget sex midget fucking] [http://web.archive.org/20071205143121/http://world-weather.cubrun.info/ world weather] [http://web.archive.org/20071205143121/adam-eve-catalog.strontic.info/ adam eve catalog] [http://web.archive.org/web/20071205142235/http://drunk-lesbian.lovich.info/ drunk lesbian] [http://web.archive.org/web/20071205142235/http://sisters-brothers.lovich.info/ sisters brothers adult sibling relationship] [http://web.archive.org/web/20071205142235/http://white-stripes.diadrome.info/ white stripes] [http://actress-sex.pyknic.info/ actress sex] [http://brother-and-sister.overwell.info/ brother and sister] [http://pokemon-haruka.overwell.info/ pokemon haruka] [http://web.archive.org/20071205143121/sony-computers.strontic.info/ sony computers] [http://back-yard.leonite.info/ back yard] [http://web.archive.org/20071205143121/http://florida-key-fishing.overwell.info/ florida key fishing trip] [http://web.archive.org/web/20071205142235/http://cliteris.diadrome.info/ cliteris] [http://web.archive.org/web/20071205142235/http://saleslogix.leonite.info/ saleslogix] [http://hardcore-dildo.overwell.info/ hardcore dildo] [http://web.archive.org/20071205143121/http://clipdump.overwell.info/ clipdump] [http://web.archive.org/web/20071205142235/http://frankie-muniz.leonite.info/ frankie muniz nude] [http://web.archive.org/20071205143121/http://secret-wish.cubrun.info/ secret wish] [http://web.archive.org/20071205143121/http://opossum.pinelike.info/ opossum] [http://web.archive.org/20071205143121/http://heart-of-sword.overwell.info/ heart of sword] [http://web.archive.org/20071205143121/http://gothic-clothing.pinelike.info/ gothic clothing] [http://web.archive.org/web/20071205142235/http://morgan-freeman.diadrome.info/ morgan freeman] [http://web.archive.org/web/20071205142235/airport-limo-san.surfle.info/ airport limo san diego] [http://mary-kate-olsen.leonite.info/ mary kate olsen in a thong] [http://web.archive.org/20071205143121/http://dido.cubrun.info/ dido] [http://web.archive.org/web/20071205142235/nude-soccer-moms.surfle.info/ nude soccer moms] [http://web.archive.org/web/20071205142235/http://rolex-prices.lovich.info/ rolex prices] [http://web.archive.org/20071205143121/http://dad-daughter-incest.pinelike.info/ dad daughter incest] [http://web.archive.org/20071205143121/http://devon-pornstar.cubrun.info/ devon pornstar] [http://web.archive.org/web/20071205142235/http://used-marine-parts.pyknic.info/ used marine parts] [http://web.archive.org/20071205143121/http://weight-management.overwell.info/ weight management] [http://web.archive.org/web/20071205142235/yahoo-dsl.surfle.info/ yahoo dsl] [http://web.archive.org/20071205143121/cum-facials-messy.strontic.info/ cum facials messy] [http://web.archive.org/20071205143121/http://new-york-music.topkick.info/ new york music schools] [http://web.archive.org/20071205143121/oregon-salem.strontic.info/ oregon salem travel] [http://web.archive.org/20071205143121/http://graduation-cap.topkick.info/ graduation cap] [http://web.archive.org/web/20071205142235/muscle-women.surfle.info/ muscle women] [http://web.archive.org/web/20071205142235/http://h2s-in-amine.lovich.info/ h2s in amine analyzer] [http://web.archive.org/20071205143121/librerie-mondadori.strontic.info/ librerie mondadori] [http://web.archive.org/20071205143121/white-pantie-hose.strontic.info/ white pantie hose girl] [http://web.archive.org/20071205143121/http://digimon-xxx.pinelike.info/ digimon xxx] [http://celebritynude.overwell.info/ celebritynude] [http://web.archive.org/20071205143121/http://erotic-audio.topkick.info/ erotic audio and free download] [http://web.archive.org/20071205143121/http://paris-pussy.pinelike.info/ paris pussy] [http://web.archive.org/20071205143121/http://alyson-hannigan.pinelike.info/ alyson hannigan] [http://web.archive.org/20071205143121/http://professor-angelicus.topkick.info/ professor angelicus visits the big blue ball] [http://web.archive.org/20071205143121/http://sydney-public.cubrun.info/ sydney public library] [http://web.archive.org/web/20071205142235/http://crack-imperator.pyknic.info/ crack imperator fla demo] [http://web.archive.org/20071205143121/http://marks-bookmarks.topkick.info/ marks bookmarks porn] [http://web.archive.org/20071205143121/http://lesbians-humping.cubrun.info/ lesbians humping] [http://reference-sample.leonite.info/ reference sample job] [http://ejaculation-photos.leonite.info/ ejaculation photos] [http://stihl-parts.leonite.info/ stihl parts] [http://web.archive.org/20071205143121/http://life-vest.overwell.info/ life vest] [http://web.archive.org/20071205143121/http://little-babes.overwell.info/ little babes] [http://web.archive.org/web/20071205142235/http://underground-rap.pyknic.info/ underground rap artist] [http://web.archive.org/web/20071205142235/http://pumpthatass.diadrome.info/ pumpthatass] [http://web.archive.org/20071205143121/http://samsung-ringtone.overwell.info/ samsung ringtone] [http://web.archive.org/web/20071205142235/http://reds-realm.pyknic.info/ reds realm] [http://web.archive.org/web/20071205142235/http://bird-house.diadrome.info/ bird house] [http://web.archive.org/web/20071205142235/http://otk-paddles.leonite.info/ otk paddles] [http://web.archive.org/web/20071205142235/http://card-game.leonite.info/ card game] [http://web.archive.org/web/20071205142235/http://busted.diadrome.info/ busted] [http://sexual-enhancers.overwell.info/ sexual enhancers] [http://web.archive.org/20071205143121/http://girls-night-out.topkick.info/ girls night out] [http://buy-cephalexin.pyknic.info/ buy cephalexin] [http://web.archive.org/web/20071205142235/http://cute-wallpaper.pyknic.info/ cute wallpaper] [http://web.archive.org/web/20071205142235/http://arai-helmets.pyknic.info/ arai helmets] [http://texas-government.leonite.info/ texas government form] [http://last-minute-cruises.leonite.info/ last minute cruises] [http://web.archive.org/20071205143121/http://florida-beaches.topkick.info/ florida beaches] [http://sweaty-teen.pyknic.info/ sweaty teen] [http://health-savings.leonite.info/ health savings account] [http://web.archive.org/20071205143121/http://free-nelly-tip.cubrun.info/ free nelly tip drill video] [http://paintless-dent.leonite.info/ paintless dent repair tools] [http://web.archive.org/20071205143121/http://lactating-ladies.topkick.info/ lactating ladies] [http://web.archive.org/20071205143121/bagget.strontic.info/ bagget] [http://web.archive.org/web/20071205142235/audie-murphy.surfle.info/ audie murphy] [http://web.archive.org/web/20071205142235/http://monster-gay.pyknic.info/ monster gay cocks] [http://web.archive.org/20071205143121/monsters-of.strontic.info/ monsters of cock] [http://web.archive.org/20071205143121/http://confidentiality.topkick.info/ confidentiality agreement] [http://web.archive.org/web/20071205142235/nude-asian-men.surfle.info/ nude asian men] [http://wounds.overwell.info/ wounds] [http://thai-slut.overwell.info/ thai slut] [http://coconut.pyknic.info/ coconut] [http://web.archive.org/20071205143121/http://canon-powershot.topkick.info/ canon powershot] [http://franklin-delano.overwell.info/ franklin delano roosevelt] [http://piss-on-you.pyknic.info/ piss on you] [http://web.archive.org/web/20071205142235/http://cross-pendants.pyknic.info/ cross pendants] [http://valerie.pyknic.info/ valerie] [http://web.archive.org/web/20071205142235/http://tiny-butts.lovich.info/ tiny butts] [http://web.archive.org/20071205143121/http://mega-boobs.pinelike.info/ mega boobs] [http://web.archive.org/web/20071205142235/http://sexiest-supermodels.pyknic.info/ sexiest supermodels] [http://web.archive.org/web/20071205142235/http://digital-map.diadrome.info/ digital map] [http://web.archive.org/web/20071205142235/thugboyz.surfle.info/ thugboyz] [http://cyclone-tracy.pyknic.info/ cyclone tracy] [http://merry-maids.pyknic.info/ merry maids] [http://web.archive.org/web/20071205142235/http://lesbians-fucking.pyknic.info/ lesbians fucking] [http://web.archive.org/web/20071205142235/http://neighbors-pussy.diadrome.info/ neighbors pussy] [http://acting-agency-uk.overwell.info/ acting agency uk] [http://web.archive.org/web/20071205142235/http://standard-trust-bank.lovich.info/ standard trust bank website] [http://web.archive.org/web/20071205142235/http://little-willie.diadrome.info/ little willie tank] [http://web.archive.org/20071205143121/ask-web-md.strontic.info/ ask web md] [http://web.archive.org/web/20071205142235/http://hot-naked-asians.lovich.info/ hot naked asians] [http://web.archive.org/web/20071205142235/http://licking-lesbians.lovich.info/ licking lesbians] [http://web.archive.org/web/20071205142235/http://sailing-boots.diadrome.info/ sailing boots] [http://web.archive.org/20071205143121/http://join.cubrun.info/ join] [http://web.archive.org/web/20071205142235/http://messy-sex.leonite.info/ messy sex] [http://web.archive.org/web/20071205142235/http://sonata.lovich.info/ sonata] [http://translate-a-sentence.pyknic.info/ translate a sentence into spanish] [http://web.archive.org/web/20071205142235/http://elisha-cuthbert.lovich.info/ elisha cuthbert belly] [http://web.archive.org/web/20071205142235/http://nude-soccer-players.lovich.info/ nude soccer players] [http://web.archive.org/20071205143121/http://miami-ink.pinelike.info/ miami ink] [http://grandpa-fucks-daughter.leonite.info/ grandpa fucks daughter] [http://web.archive.org/20071205143121/http://pet-shop-boys.topkick.info/ pet shop boys mp3] [http://web.archive.org/web/20071205142235/http://cuddle.pyknic.info/ cuddle] [http://dresses.pyknic.info/ dresses] [http://web.archive.org/20071205143121/http://halo-cheats.overwell.info/ halo cheats] [http://web.archive.org/web/20071205142235/http://gundam-mp3.diadrome.info/ gundam mp3] [http://web.archive.org/20071205143121/http://strand.topkick.info/ strand] [http://web.archive.org/20071205143121/http://gsxr-750.topkick.info/ gsxr 750] [http://web.archive.org/web/20071205142235/http://bridal-poems.pyknic.info/ bridal poems] [http://web.archive.org/20071205143121/http://mature-woman.overwell.info/ mature woman fucking young man] [http://web.archive.org/web/20071205142235/http://cricket-wireless.leonite.info/ cricket wireless phone] [http://english-to-spanish.leonite.info/ english to spanish translator] [http://golden-retriever.leonite.info/ golden retriever] [http://web.archive.org/20071205143121/http://york-dungeon.pinelike.info/ york dungeon] [http://web.archive.org/20071205143121/http://tractor-parts.cubrun.info/ tractor parts] [http://web.archive.org/20071205143121/http://white-trash-girls.pinelike.info/ white trash girls] [http://web.archive.org/20071205143121/http://creflo-dollar.cubrun.info/ creflo dollar] [http://web.archive.org/20071205143121/http://free-lesbian.pinelike.info/ free lesbian porn movies] [http://web.archive.org/web/20071205142235/low-cost-hosting.surfle.info/ low cost hosting] [http://self-sucking-your.pyknic.info/ self sucking your own cock] [http://web.archive.org/web/20071205142235/http://who-were-my-ancestors.pyknic.info/ who were my ancestors] [http://web.archive.org/20071205143121/colorado-springs.strontic.info/ colorado springs special events] [http://young-titties.overwell.info/ young titties] [http://web.archive.org/web/20071205142235/http://new-frontier-wind.diadrome.info/ new frontier wind river] [http://web.archive.org/20071205143121/http://india-flood.topkick.info/ india flood] [http://web.archive.org/web/20071205142235/http://online-roulette.leonite.info/ online roulette game]
{{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