Event Handler
DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
An Event Handler is a function registered in a special way to be called when certain things (events) happen.
Official Events Documentation: [Events]
- Registering a function as Event Handler in its general abstract form is:
RegisterEventHandler( (EventType)mEvent, (string)mEventIdentifier, (function)mEventHandler)
mEvent
can be one of the following events:
EventType. + LoadedFromBackup, .Destroyed, .CreatedObject, .ModuleAttached, .Timer, .Message, .EnterView, .LeaveView, .RequestPickUp, .RequestDrop, .RequestEquip, .ContainerItemAdded, .ContainerItemRemoved, .ItemEquipped, .ItemUnequipped, .StartMoving, .Arrived, .Use, .PlayerSpeech, .ClientUserCommand, .ClientObjectCommand, .ClientTargetAnyObjResponse, .ClientTargetGameObjResponse, .ClientTargetLocResponse, .ContextMenuResponse, .DynamicWindowResponse, .UserLogout, .GlobalVarUpdateResult
Example:
RegisterEventHandler(EventType.Timer, "MyCoolestTimer", HandleTick)