Trigger remove: Difference between revisions
Jump to navigation
Jump to search
Warning:Removing some entities can cause instability.
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{ | {{base brush|trigger_remove}} It is a [[trigger]] volume that removes any [[entity|entities]] that touch it. | ||
{{optim_brush}} | {{optim_brush}} | ||
Line 11: | Line 7: | ||
This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their ''OnKilled'' outputs. | This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their ''OnKilled'' outputs. | ||
{{code class|CTriggerRemove|triggers.cpp}} | |||
{{ | |||
==Keyvalues== | ==Keyvalues== | ||
{{KV Trigger}} | |||
==Flags== | ==Flags== | ||
{{Fl Trigger}} | |||
==Inputs== | ==Inputs== | ||
{{I Trigger}} | |||
==Outputs== | ==Outputs== | ||
Line 31: | Line 25: | ||
==Scripting== | ==Scripting== | ||
-This is revelant to many wiki users, please do not remove!- | <!-- This is revelant to many wiki users, please do not remove! (really...?) --> | ||
To make a trigger_remove ingame do the following: | To make a trigger_remove ingame do the following: | ||
Create the trigger | * Create the trigger | ||
* Create an entity you wish to be the trigger | |||
Create an entity you wish to be the trigger | * Parent the trigger to that entity | ||
Parent the trigger to that entity | |||
-This is revelant to many wiki users, please do not remove!- | <!-- This is revelant to many wiki users, please do not remove! --> |
Revision as of 16:33, 28 July 2011
Template:Base brush It is a trigger volume that removes any entities that touch it.

This is not the same as killing entities; i.e. NPCs removed in this manner will not fire their OnKilled outputs.
Keyvalues
|
Flags
|
Inputs
|
Outputs
- {| class="mw-collapsible mw-collapsed" style="background:initial;float:no;margin-bottom:1em;margin-left:0;padding-right:0.5em;border:1px solid rgba(255,255,255,0.1); border-left:solid 1px #8bb9e0; padding-left:1em;"
|+ style="text-align:left; white-space:nowrap; font-weight:bold; color:#ddd; " | BaseTrigger |
- OnStartTouch
- !activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger.
- OnStartTouchAll
- !activator = entity that caused this output
!caller = this entity
Fired when a valid entity starts touching this trigger, and no other entities are touching it. If there are any other entities touching the trigger when a new one begins to touch, onlyOnStartTouch
will fire.
- OnEndTouch
- !activator = entity that caused this output
!caller = this entity
Fired when a valid entity stops touching this trigger. Note:Will also fire for entities touching it when trigger is disabled via
Disable
inputWarning:This includes entities which are deleted while inside the trigger. In this case !activator will be invalid.
Warning:
OnEndTouch
can fire beforeOnStartTouch
under certain circumstances[How?] where both are fired on the same tick and each have the same delay.Fix:Add a slight delay to
OnEndTouch
.
- OnEndTouchAll
- !activator = entity that caused this output
!caller = this entity
Fired when all valid entities stop touching this trigger.
- OnTouching (in all games since
)
- !activator = !caller = this entity
Fired if something is currently touching this trigger whenTouchTest
is fired.
- OnNotTouching (in all games since
)
- !activator = !caller = this entity
Fired if nothing is currently touching this trigger whenTouchTest
is fired.
|}
- OnRemove
- Fired whenever an entity is removed.
Scripting
To make a trigger_remove ingame do the following:
- Create the trigger
- Create an entity you wish to be the trigger
- Parent the trigger to that entity