(info) 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

ParameterTypeMandatoryNotesAPI Version
shortNameString(tick)

The short name of the event to enable.

For example, "destroyed" is the short name for "eventDestroyed".

(info) The event is automatically defined if not present.

0.1

Return values

ValueTypeNotesAPI Version
trueBooleanThe event was enabled.0.1
falseBooleanThe 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");

 

Â