AreaTrigger.bindOnExit
Binds an area trigger's onExit event to a custom callback. The onExit event is triggered when an object leaves the trigger area.
Kind: Function
Environments: Game
Game
areaTrigger:bindOnExit( callback, object )
The callback receives:
- self (table) – The class instance.
- trigger (AreaTrigger) – The area trigger instance.
- results (table) – A table of characters and/or bodies and/or harvestables and/or lifts and/or areaTriggers.
function MyClass.onExit( self, trigger, results ) ...
Parameters:
| Name | Type | Description |
|---|---|---|
areaTrigger |
AreaTrigger | The area trigger instance. |
callback |
string | The name of the Lua function to bind. |
object (optional) |
table | The object that will receive the callback. (optional) |