Difference between revisions of "RegisterEventHandler"
(→Prototype) |
(→RegisterEventHandler(...) =) |
||
Line 25: | Line 25: | ||
| <code>(function)mEventHandler:</code> || Handler function reference. Can be a function name or a function defined inline. | | <code>(function)mEventHandler:</code> || Handler function reference. Can be a function name or a function defined inline. | ||
|} | |} | ||
− | Return Values | + | Return Values<br> none |
− | |||
=== Notes and Caveats === | === Notes and Caveats === |
Revision as of 18:51, 1 November 2016
RegisterEventHandler official Doc
RegisterSingleEventHandler official Doc
OverrideEventHandler official Doc
RegisterEventHandler(...)
=
Function Type: | Engine API |
Function Category: | Global |
Description
Registers an event handler which calls the specified function when the Events fires with a matching event identifier.
Prototype
RegisterEventHandler( (EventType)mEvent, (string)mEventIdentifier, (function)mEventHandler)
Parameters:
(LuaEventType) mEvent: |
The event type the handler shall respond to (EventType.Message, EventType.Timer, etc ...) |
(string)mEventIdentifier: |
Event Identifier of the specific event (described in the Events section of the documentation |
(function)mEventHandler: |
Handler function reference. Can be a function name or a function defined inline. |
Return Values
none
Notes and Caveats
These handlers are not saved and must be registered every time the object is loaded.