event |
Discworld driver help |
event |
Name
event() - send an event to objects
Synopsis
void event( object|object * target, string event_name, ... );
Description
Sends the event `event_name' to the specified `target' object by calling a function named "event_<event_name>" on the objects. If a single object is specified the function will be called in the object and its inventory. If an array of objects is specified it will be called on all objects in the array, NOT on their inventory.
The event is called with the origin object (the object doing the event() call) as first argument, and the rest of the arguments passed to the efun after the event name.
Example
If /obj/handlers/new_soul does
event(environment(this_player()), "soul", "Bing!");
it will cause
void event_soul(object ob, string mess);
to be called in the room and its contents, with
ob = /obj/handlers/new_soul
and
mess = "Bing!"