OnTriggerEnter
From GECK
This is reported when a new ref is added to the trigger's list. The newly added ref is set as the action ref on the trigger (as reported by IsActionRef and GetActionRef). Only one enter action may be triggered per frame. If two refs enter the trigger the same frame, only one is added to the list so that the other ref will be added next frame. (Meaning you are guaranteed to always get an OnTriggerEnter for every actor that enters a trigger box.)
If the parameter is specified, the block is run only if the specified ref is the one entering the trigger box. Otherwise, the block is run when any ref enters the trigger box.
Syntax
begin OnTriggerEnter TriggeringRefID (optional)
Notes
- OnTriggerEnter will run before OnTrigger if placed above the OnTrigger block in a script.
- While the only object type to receive this event under normal circumstances is activators, any actor, such as NPCs, can be made to receive the event by calling the EnterTrigger function on the reference directly. This can be used for scripting special activations independent of the normal Activate event, for example.
See Also
- Creating Primitives
- EnterTrigger
- OnTrigger
- OnTriggerLeave
- This blocktype is available as an Event Handler.