Skip to main content

event_destruct

Discworld events help

event_destruct

Name

event_destruct - Called on an object when it will be destructed.

Syntax

void event_destruct();

Description

This is the function called on things when they about to be successfully destructed by dest_me. You should NOT attempt prevent the destruction with this routine however you may notify something else that the item is effectively gone. If you need to prevent destruction then mask dest_me() on the object. The call is made using a call_out so shadows may use the event. This event is not a true event in that it does not use the event system. If anything substantial is to be done by event_destruct a call_out should be invoked so that dest_me can return promptly.

Examples:

/* Wicked Witch NPC */
void event_destruct() {
children("/std/munchkin")->init_command(
"say Ding Dong the witch is dead, the Wicked Witch is dead!",1);
}
} /* event_destruct() */

See also

move, event_exit, event_move_object, event_enter, dest_me, event_dest_me