Trigger multiple: Difference between revisions
Jump to navigation
Jump to search
Yar Kramer (talk | contribs) (→Outputs: trigger_once doesn't have OnEntireTeamStartTouch) |
|||
(47 intermediate revisions by 26 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} {{Source topicon}} | ||
{{ | {{TabsBar|main=Trigger multiple}} | ||
{{CD|CTriggerMultiple|file1=triggers.cpp|CBaseTrigger}} | |||
{{this is a|brush entity|name=trigger_multiple}} It is a volume that fires [[output]]s when a specified type of [[entity]] enters or leaves it. | |||
{{Sensor brush}} | |||
{{ | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV Targetname}} | |||
{{KV|Delay Before Reset|intn=wait|float|Delay in seconds before ''OnTrigger'' can fire again, 0 defaults to 0.2. If set to -1, it will kill itself when triggered (as trigger_once), which means outputs like OnEntireTeamStartTouch can never fire.}} | |||
: < | {{KV|only=L4ds|intn=entireteam|Entire Team Number|choices|If the entire team is touching, fire OnEntireTeamStartTouch.}} | ||
:* 0 : None | |||
:* 2 : Survivor | |||
:* 3 : Infected | |||
{{KV|only=L4ds|intn=allowincap|Incapacitated players can trigger|boolean|Whether incapacitated players can trigger. | |||
:{{bug|When 0 and player is incapacitated in the trigger it correctly fires <code>OnEndTouch</code> output, but when player is revived OnStartTouch output won't be fired and also using vscript function <code>trigger.IsTouching(player)</code> will return false for the given player. The behaviour when Entire Team Number is picked differs. When player is incapacitated <code>OnEndTouch</code> output is NOT fired and player is considered still touching the trigger so this bug won't occur in such case.|tested=l4d2}}}} | |||
{{KV|only=L4ds|intn=allowghost|Ghost players can trigger|boolean|Whether ghost survivors can trigger.}} | |||
{{KV BaseTrigger|startcollapsed=0}} | |||
==Flags== | ==Flags== | ||
{{Fl BaseTrigger|startcollapsed=0}} | |||
==Inputs== | ==Inputs== | ||
{{I BaseTrigger|startcollapsed=0}} | |||
==Outputs== | ==Outputs== | ||
{{O|OnEntireTeamStartTouch|activator=the player that last touched this trigger|Fired when an entire team starts touching the trigger. (i.e. the last player of the given team entered the trigger when everyone else is already inside)|only={{l4ds}}}} | |||
* {{ | {{O|OnEntireTeamEndTouch|activator=the player that left the trigger|Fired when an entire team stops touching the trigger. (i.e. when full team is touching the trigger and one survivor leaves the trigger)|only={{l4ds}}}} | ||
{{O|OnTrigger|activator=the entity that caused this output|Fired repeatedly with a delay while an entity is within this trigger's volume. Delay is defined by <tt>Delay Before Reset</tt> key.}} | |||
{{O BaseTrigger|startcollapsed=0}} | |||
== See also == | |||
* {{ent|trigger_once}} | |||
* [[Inputs and Outputs]] | |||
[[Category:IO System]] |
Latest revision as of 13:23, 1 June 2025
![]() |
---|
CTriggerMultiple |
![]() |
trigger_multiple
is a brush entity available in all Source games. It is a volume that fires outputs when a specified type of entity enters or leaves it.
Keyvalues
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
- Delay Before Reset (wait) <float>
- Delay in seconds before OnTrigger can fire again, 0 defaults to 0.2. If set to -1, it will kill itself when triggered (as trigger_once), which means outputs like OnEntireTeamStartTouch can never fire.
- Entire Team Number (entireteam) <choices> (only in
)
- If the entire team is touching, fire OnEntireTeamStartTouch.
- 0 : None
- 2 : Survivor
- 3 : Infected
- Incapacitated players can trigger (allowincap) <boolean> (only in
)
- Whether incapacitated players can trigger.
Bug:When 0 and player is incapacitated in the trigger it correctly fires
OnEndTouch
output, but when player is revived OnStartTouch output won't be fired and also using vscript functiontrigger.IsTouching(player)
will return false for the given player. The behaviour when Entire Team Number is picked differs. When player is incapacitatedOnEndTouch
output is NOT fired and player is considered still touching the trigger so this bug won't occur in such case. (tested in: l4d2)
- Ghost players can trigger (allowghost) <boolean> (only in
)
- Whether ghost survivors can trigger.
|
Flags
|
Inputs
|
Outputs
- OnEntireTeamStartTouch (only in
)
- !activator = the player that last touched this trigger
!caller = this entity
Fired when an entire team starts touching the trigger. (i.e. the last player of the given team entered the trigger when everyone else is already inside)
- OnEntireTeamEndTouch (only in
)
- !activator = the player that left the trigger
!caller = this entity
Fired when an entire team stops touching the trigger. (i.e. when full team is touching the trigger and one survivor leaves the trigger)
- OnTrigger
- !activator = the entity that caused this output
!caller = this entity
Fired repeatedly with a delay while an entity is within this trigger's volume. Delay is defined by Delay Before Reset key.
|