Core Help Root: Subsystems: Events: Registering


The Registering subsystem allows an object to register an event hook along with when it should be turned on/off and when it should be updated (such as when the object is moved). Events are registered with the Event to Hook, when to Hook it and where to Hook it at (relay).

The event to hook can be any symbol that represents an event. An event type is created by simply sending it, so there is no registration or initialization involved in creating a new event (see Sending Events for more information)

When to hook the event can currently be either at startup, or when the object is moved. The symbols 'startup or 'move are sent to specify this.

The relay for the event, or where you hook into it at (see Sending Events for more information on event relay's) must be one of: 'location, 'this or an object which is a descendant of $event_handler. If 'location is set as the source, the object's current location is used for the event relay. If 'this is used as the source, the object itself is used for the relay.

The methods used for Registering are:

.register_event(event, when, relay)
Used to register an event hook. You should only need to call this method once in the life of an object, unless it is unregistered later.
.deregister_event(event, when)
Used to de-register an event hook.


Registering | Hooks | Sending | Receiving | Standard


the Cold Dark