ff_d_are_destroy

Destroy the area running this script.

The area is destroyed on its next heartbeat. An area cannot be destroyed while a PC is in it, so the attempt is repeated on every heartbeat until the area is empty.

Scripts

OnHeartbeat: ff_d_are_destroy

Source code

// @code

void main()
{
  int nEvent = GetCurrentlyRunningEvent();
  if (nEvent == EVENT_SCRIPT_AREA_ON_HEARTBEAT)
  {
    DestroyArea(OBJECT_SELF);
    SetEventScript(OBJECT_SELF, EVENT_SCRIPT_AREA_ON_HEARTBEAT, "");
  }
}