This AI is still in early stages of development.
Event.enable()
Enable the listener for an event, even if there are no event handlers attached...
Syntax
Event.enable(shortName);Parameters
Parameter | Type | Mandatory | Notes | API Version |
|---|---|---|---|---|
shortName | String | The short name of the event to enable. For example, "destroyed" is the short name for "eventDestroyed". The event is automatically defined if not present. | 0.1 |
Return values
Value | Type | Notes | API Version |
|---|---|---|---|
| Boolean | The event was enabled. | 0.1 |
| Boolean | The event was already enabled, eg. because a handler was added to the event. | 0.1 |
Notes
This is useful when you require input/output hooks attached to events to be triggered even if there are no handlers for that event.
Example
Event.enable("gameLoaded");