Skip to content
This repository has been archived by the owner on Aug 9, 2020. It is now read-only.
Travis edited this page Jul 3, 2018 · 4 revisions

The Event mixin allows easy management of game events and the functions they call once triggered.


Event:RegisterEvent(event, handler)

Registers an event which the handler will be triggered for.
If the handler returns true, Event:UnregisterEvent() will be executed.

  • event - event to register (string)
  • handler - handler the event should trigger (function)

Event:UnregisterEvent(event, handler)

Unregisters an event for the given handler.

  • event - event to register (string)
  • handler - handler the triggering event (function)

Event:TriggerEvent(event[, ...])

Trigger registered handler(s) with the given event and optional parameters.

  • event - name of the event to trigger (string)
  • ... - additional parameter(s) to pass to the handler(s) (optional)
Clone this wiki locally