Template:O Source 2 BaseTrigger: Difference between revisions
Jump to navigation
Jump to search
Warning:This includes entities which are deleted while inside the trigger. In this case !activator will be invalid.
Warning:Will also fire if sent
Warning:
Fix:Add a slight delay to
Confirm:Confirm these old warning see if it's also affected in Source 2 or not.
Bug:Spamming crouch jump in a trigger can randomly fire
Confirm:Is it a Multiplayer issue only?, also old Source 1 issue, confirm if the same thing happen in Source2. [todo tested in ?]
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
{{IO|OnStartTouchAll|Fired when an entity starts touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.}} | {{IO|OnStartTouchAll|Fired when an entity starts touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.}} | ||
{{IO|OnEndTouch|Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire. | {{IO|OnEndTouch|Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire. | ||
{{Warning|offset=1|This includes entities which are deleted while inside the trigger. In this case | {{Warning|offset=1|This includes entities which are deleted while inside the trigger. In this case {{ent|!activator}} will be invalid.}} | ||
{{Warning|offset=1|Will also fire if sent <code>Disable</code> input or an entity teleports outside of the trigger area.}} | {{Warning|offset=1|Will also fire if sent <code>Disable</code> input or an entity teleports outside of the trigger area.}} | ||
{{Warning|offset=1|<code>OnEndTouch</code> can fire before <code>OnStartTouch</code> under certain circumstances where both are fired on the same tick and each have the '''same''' delay. {{fix|Add a slight delay to <code>OnEndTouch</code>.}} | {{Warning|offset=1|<code>OnEndTouch</code> can fire before <code>OnStartTouch</code> under certain circumstances where both are fired on the same tick and each have the '''same''' delay. {{fix|Add a slight delay to <code>OnEndTouch</code>.}} | ||
{{Confirm|Confirm these old warning see if it's also affected in Source 2 or not.}} | {{Confirm|Confirm these old warning see if it's also affected in Source 2 or not.}} | ||
}} | }} | ||
{{bug|offset=1|Spamming crouch jump in a trigger can randomly fire <code>OnEndTouch</code>.{{Confirm|Is it a Multiplayer issue only?, also old Source 1 issue, confirm if the same thing happen in | {{bug|offset=1|Spamming crouch jump in a trigger can randomly fire <code>OnEndTouch</code>.{{Confirm|Is it a Multiplayer issue only?, also old Source 1 issue, confirm if the same thing happen in Source2.}}}} | ||
{{IO|OnEndTouchAll|Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.}} | {{IO|OnEndTouchAll|Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.}} | ||
{{IO|OnTouching|Fired when the TestTouch input is true (something is touching the trigger.)}} | {{IO|OnTouching|Fired when the TestTouch input is true (something is touching the trigger.)}} |
Revision as of 07:29, 16 February 2025
{{expand|title=BaseTrigger|startcollapsed=1|noborder=0|bgcolor=initial|
- OnKilled
- Fired when the entity is killed and removed from the game. Parameter is the inflictor.
- OnStartTouch
- Fired when an entity starts touching this trigger. The touching entity (!activator) must pass this trigger's filters to cause this output to fire.
- OnStartTouchAll
- Fired when an entity starts touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.
{{IO|OnEndTouch|Fired when an entity stops touching this trigger. Only entities that passed this trigger's filters will cause this output to fire.


Disable
input or an entity teleports outside of the trigger area.
OnEndTouch
can fire before OnStartTouch
under certain circumstances where both are fired on the same tick and each have the same delay. 
OnEndTouch
.

OnEndTouch
.
- OnEndTouchAll
- Fires when an entity stops touching this trigger, and no other entities are touching it. Only entities that passed this trigger's filters are considered.
- OnTouching
- Fired when the TestTouch input is true (something is touching the trigger.)
- OnTouchingEachEntity
- Fires for each entity inside the trigger when the TestTouch input is true. Each call provides the individual entity as the activator.
- OnNotTouching
- Fired when the TestTouch input is not true (nothing is touching the trigger.)