selfpurge

selfpurge

Remove the owner mobile from the world.

The owner mob is purged immediately, exactly as the staff purge command would. Use this for self-destructing or vanishing mobs. After this runs the owner no longer exists, so no further owner-affecting commands in the same handler will have a target.

Arguments

Takes no arguments.

Returns

null. Like the other action commands, a successful selfpurge in the handle phase suppresses the event's default action.

Owner

The owner must be a mobile. Called from an object or room script, selfpurge does nothing.

Examples

handle command (say) {
  selfpurge
}

The owner mob removes itself. The script compiles and runs to completion.

after tick {
  if [eq [hour] 6] {
    do "say My work here is done."
    selfpurge
  }
}

At dawn the mob announces itself and then vanishes. (Run the message before the purge — once purged, the mob can no longer do anything.)

See also