OnTriggerLeave

From GECK
Jump to: navigation, search

This is reported when a ref is removed from the list because it is no longer colliding with the trigger. The removed ref is set as the action ref on the trigger. Only one leave action may be triggered per frame and a leave action can never be triggered in the same frame as an enter action. If two refs leave in the same frame only one ref is removed from the list so that the other ref will be removed next frame. If a ref leaves in the same frame that another ref enters, the leaving ref is not removed from the list so that it will be removed next frame.

If the parameter is specified, the block is run only if the specified ref is the one leaving the trigger box. Otherwise, the block is run when any ref leaves the trigger box.

Syntax

 begin OnTriggerLeave TriggeringRefID (optional)

Notes

  • OnTriggerLeave will NOT trigger if the player leaves the cell through a load door while standing inside a trigger volume using this code block. Another trigger on the other side of the door with OnTriggerEnter will need to be used instead.
  • This code block will trigger if the actor is moved out of the trigger volume via functions like MoveTo, or if the player fast travels while standing inside the trigger.

See Also