Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

destroy

destroy(authority, entity): void

Destroys entity, on the world authority decides for: every reference a trait holds to it reads null from now on, and its body goes with it. An Authority destroys any entity of its world, and findAuthority(world, entity) gives one over an entity only a page holds. An entity already gone is left as it is. Inside a player’s onPlayerLeave, the entity is destroyed once her leave has read her record, so it reads as it was until her leave hooks end.

Parameter Type
authority EntityAuthority
entity Entity

void