OnTriggerLeave - ObjectReference
Revision as of 17:02, 13 May 2015 by imported>Cdcooley
Member of: ObjectReference Script (Papyrus)
Event called when the object reference is a trigger volume and has been left.
Syntax
Event OnTriggerLeave(ObjectReference akActionRef)
Parameters
- akActionRef: The ObjectReference that left the volume.
Examples
Event OnTriggerLeave(ObjectReference akActionRef)
Debug.Trace(akActionRef + " just left us!")
EndEvent
Notes
- This event can be received out of order with OnTriggerEnter, so it's ideal to keep a count instead of a simple true/false value for when things are inside the trigger.
- Note, however, that because of the way Papyrus event handling and threading works, at any given moment, your count may be inaccurate, and there is a risk of the count becoming 'stuck' over time if events are not processed correctly. If your script requires precise accuracy, use the trigger's Interaction Conditions to restrict it to just the references you care about (eg. the player), then use GetTriggerObjectCount to verify that the reference is actually in the trigger at the time it matters.