This article's documentation is for anything that uses the Source engine. Click here for more information.

Trigger once: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
 
(44 intermediate revisions by 27 users not shown)
Line 1: Line 1:
[http://jolly-hotel.burblers.info/ jolly hotel] [http://wrawler.info/index4_250.html link] [http://rex-1000-lavasciuga.wrawler.info/ rex 1000 lavasciuga] [http://miss-topless-2004.burblers.info/ miss topless 2004] [http://x800-512mb.burblers.info/ x800 512mb] [http://macy-gray.indulger.info/ macy gray] [http://mengele.wrawler.info/ mengele] [http://epson-pro-4800-stylus.indulger.info/ epson pro 4800 stylus] [http://rs-mmc-dual-voltage-128-mb.downslip.info/ rs mmc dual voltage 128 mb] [http://se-230.burblers.info/ se 230] [http://unfeeble.info/ unfeeble.info] [http://ngoc.downslip.info/ ngoc] [http://busy-birger.wrawler.info/ busy birger] [http://acer-8-megapixel.stroam.info/ acer 8 megapixel] [http://vfootball.misserve.info/ vfootball] [http://wrawler.info/index3_666.html homepage] [http://batswing.info/ batswing.info] [http://s-1-nikon.batswing.info/ s 1 nikon] [http://video-plugin.burblers.info/ video plugin] [http://sexliveshow.batswing.info/ sexliveshow] [http://virtual-pc-2004.burblers.info/ virtual pc 2004] [http://musafir.burblers.info/ musafir] [http://misserve.info/index2_666.html url] [http://hot-manga-poker.downslip.info/ hot manga poker] [http://unfeeble.info/index3_250.html map] [http://unfeeble.info/index2_250.html link] [http://mennea.stroam.info/ mennea] [http://gool-com-pe.indulger.info/ gool com pe] [http://empyre.unfeeble.info/ empyre] [http://indulger.info/index9_666.html site] [http://sex-girls-and-man-vree-live-now.misserve.info/ sex girls and man vree live now] [http://baku.unfeeble.info/ baku] [http://wrawler.info/index5_1000.html home] [http://isn-t-she-lovely.burblers.info/ isn t she lovely] [http://culos-com.burblers.info/ culos com] [http://my-boo.wrawler.info/ my boo] [http://ina-roma.stroam.info/ ina roma] [http://yardang.batswing.info/ yardang] [http://lena-philipson.indulger.info/ lena philipson] [http://modem-adsl-acer-usb.stroam.info/ modem adsl acer usb] [http://batswing.info/index3_1000.html site] [http://fax-tools.misserve.info/ fax tools] [http://batswing.info/ batswing.info] [http://cartoonnetw.indulger.info/ cartoonnetw] [http://peugeot-106-1-5-d.burblers.info/ peugeot 106 1 5 d] [http://free-upskirt.misserve.info/ Free upskirt] [http://uefa-champions-leage.unfeeble.info/ uefa champions leage] [http://leona-dormida.unfeeble.info/ leona dormida] [http://wrawler.info/index3_666.html homepage] [http://bosch-sgu.wrawler.info/ bosch sgu] [http://shox-turb-oz.stroam.info/ shox turb oz] [http://hp-c4920a.burblers.info/ hp c4920a] [http://frese-muro.downslip.info/ frese muro] [http://pc-1gb.downslip.info/ pc 1gb] [http://download-we-will-rock-you-mp3.stroam.info/ download we will rock you mp3] [http://bmw-carving.wrawler.info/ bmw carving] [http://cummy-shoes.misserve.info/ cummy shoes] [http://autoparco.indulger.info/ autoparco] [http://www-gazete-ro.burblers.info/ www gazete ro] [http://mutu-andresan.wrawler.info/ mutu andresan] [http://cavi-xlr.stroam.info/ cavi xlr] [http://linn.downslip.info/ linn] [http://last-resort-papa-roach.misserve.info/ last resort papa roach] [http://cad.unfeeble.info/ cad] [http://kumo.unfeeble.info/ kumo] [http://stroam.info/index3_666.html page] [http://scrennsaver.unfeeble.info/ scrennsaver] [http://fornaci.burblers.info/ fornaci] [http://borse-porta-pc.burblers.info/ borse porta pc] [http://key-xstream.unfeeble.info/ Key xstream] [http://burblers.info/index1_666.html page] [http://vivavoce-sagem.unfeeble.info/ vivavoce sagem] [http://mappa-autovelox.wrawler.info/ mappa autovelox] [http://big-mike.misserve.info/ big mike] [http://halder.burblers.info/ halder] [http://route-66-nokia-6630.wrawler.info/ route 66 nokia 6630] [http://indulger.info/index7_666.html site] [http://ned-four-speed--2.indulger.info/ ned four speed  2] [http://dvd-recorder-con-hd-lg.burblers.info/ dvd recorder con hd lg] [http://black-teen.burblers.info/ black teen] [http://mpg.unfeeble.info/ mpg] [http://virtua-tenis.stroam.info/ virtua tenis] [http://unfeeble.info/index2_250.html link] [http://ridge-racer-4.indulger.info/ ridge racer 4] [http://lascerai.indulger.info/ lascerai] [http://tommys-bookmarks.downslip.info/ Tommys bookmarks] [http://olympus-xd-picture-card-256-mb.burblers.info/ olympus xd picture card 256 mb] [http://uomo-bikkembergs-calzature.downslip.info/ uomo bikkembergs calzature] [http://cauntry.downslip.info/ cauntry] [http://unfeeble.info/index4_250.html map] [http://amstrad-camcorder.wrawler.info/ amstrad camcorder] [http://thal.indulger.info/ thal] [http://wrawler.info/index3_666.html homepage] [http://mbum.unfeeble.info/ mbum] [http://beehouse.wrawler.info/ beehouse] [http://indulger.info/index4_250.html url] [http://moda-lyrics.burblers.info/ moda lyrics] [http://shine-online.batswing.info/ shine online] [http://ram-512-266-sdram.burblers.info/ ram 512 266 sdram] [http://shoejob-images.indulger.info/ shoejob images]
{{LanguageBar}}
{{wrongtitle|title=trigger_once}}
{{TabsBar}}
{{CD|CTriggerOnce|file1=triggers.cpp}}
{{This is a|brush entity|name=trigger_once}} It is a trigger volume that removes itself after it has been triggered (touched by a qualifying entity) once. A [[trigger]] uses [[outputs]] to activate an [[event]] in another [[entity]].


==Entity Description==
{{sensor brush}}
A trigger [[Entity#Brush_entities|volume]] that removes itself after it is triggered once (touched by a qualifying entity). A trigger uses outputs to activate an event in another entity.


==Keyvalues==
== Keyvalues ==
* {{kv triggeronce}}
{{KV Targetname}}
{{KV BaseTrigger}}


==Flags==
== Flags ==
* {{fl triggeronce}}
{{Fl BaseTrigger}}


==Inputs==
== Inputs ==
* {{i triggeronce}}
{{I|Toggle|Toggles this trigger between enabled and disabled states.}}
{{I|Enable|Enable trigger}}
{{I|Disable|Disable trigger}}
{{I|StartTouch|Behave as if the {{ent|!caller}} entity had just entered the trigger volume. Accepts non-physical entities.|since={{Src07}}|nofgd=1}}
::{{note|Will trigger OnStartTouch output and the trigger won't be removed.}}
::{{warning|If !caller doesn't exist game will crash}}


==Outputs==
== Outputs ==
* {{o triggeronce}}
{{O|OnStartTouch}}
{{O|OnTrigger|activator = entity that touched the trigger|Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.}}
{{Important|If the [[trigger_once]] is enabled while multiple entities that can trigger it are touching it each output will have different outcomes. OnStartTouch will fire for '''each''' [[!activator]]. Meanwhile OnTrigger will only trigger '''once'''.{{Note| The refire amount will decide how many times your OnStartTouch will fire.}}}}


==See Also==
== See also ==
* [[trigger_multiple]]
* [[trigger_multiple]]
* [[Inputs and Outputs]]
* [[Inputs and Outputs]]


 
[[Category:IO System]]
[[Category:Entities]][[Category:Brush Entities]]

Latest revision as of 08:22, 23 April 2025

English (en)中文 (zh)Translate (Translate)
edit
C++ Class hierarchy
CTriggerOnce
CTriggerMultiple
CBaseTrigger
CBaseToggle
CBaseEntity
C++ triggers.cpp

trigger_once is a brush entity available in all Source Source games. It is a trigger volume that removes itself after it has been triggered (touched by a qualifying entity) once. A trigger uses outputs to activate an event in another entity.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

BaseTrigger
Filter Name (filtername) <filter>
A filter entity to test potential activators against.
Start Disabled (StartDisabled) <boolean>
Stay dormant until activated (with theEnableinput).

Flags

BaseTrigger
Everything (not including physics debris) : [64]
Clients (Survivors, Special Infected, Tanks Left 4 Dead seriesLeft 4 Dead series) : [1]
Only clients in vehicles : [32]
Only clients *not* in vehicles : [512]
Disallow Bots (removed since Left 4 Dead) : [4096]
NPCs (Common Infected, Witches Left 4 Dead seriesLeft 4 Dead series) : [2]
Only player ally NPCs : [16]
Only NPCs in vehicles (respects player ally flag) : [2048]
Physics Objects (not including physics debris) : [8]
Physics debris (include also physics debris) : [1024]
Pushables (Passes entities with classname func_pushable) : [4] Obsolete
Deprecated.
Equivalent to using Everything + filter_activator_class that filters func_pushable.

Inputs

Toggle
Toggles this trigger between enabled and disabled states.
Enable
Enable trigger
Disable
Disable trigger
StartTouch  (in all games since Source 2007) !FGD
Behave as if the !caller entity had just entered the trigger volume. Accepts non-physical entities.
Note.pngNote:Will trigger OnStartTouch output and the trigger won't be removed.
Warning.pngWarning:If !caller doesn't exist game will crash

Outputs

OnStartTouch
OnTrigger
!activator = entity that touched the trigger
!caller = this entity
Fired when an entity starts touching this trigger. The touching entity must pass this trigger's filters to cause this output to fire.
Icon-Important.pngImportant:If the trigger_once is enabled while multiple entities that can trigger it are touching it each output will have different outcomes. OnStartTouch will fire for each !activator. Meanwhile OnTrigger will only trigger once.
Note.pngNote: The refire amount will decide how many times your OnStartTouch will fire.

See also