Event (class)

From Moondust Wiki
Jump to navigation Jump to search

This class is used to pass additional data to the event function. This class is mainly used for LunaLua event which are not sync with the main LunaLua event loop. Please note that not every event is cancellable. If doing anyway, it will throw an error.

Event class
Type Function/Field Return values/Value type Description
Field (ro) Event.eventName string The name of the event-type! Not a SMBX Event!
Field (ro) Event.cancellable boolean Returns true, if the event is cancellable.
Field Event.cancelled boolean If set to true, then the event will be cancelled and the hoster of the event will take action to this decision.