AreaTrigger.bindOnStay
Binds an area trigger's onStay event to a custom callback. The onStay event is triggered every tick as long as an object is staying inside of the trigger area.
Kind: Function
Environments: Game
Game
areaTrigger:bindOnStay( 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.onStay( 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) |