DestroyEntity
Removes an entity from the world, for everyone.
A horse under a rider dismounts them; a pickup vanishes; an actor’s corpse is gone; a dog leaves. Anything a mode created is also removed by a reload.
Syntax
Section titled “Syntax”DestroyEntity(id)| Parameter | Type | |
|---|---|---|
id |
number | the entity |
Returns
Section titled “Returns”boolean - false when there is no such entity
Example
Section titled “Example”SetTimer(function() DestroyEntity(corpse) end, 20000)See also
Section titled “See also”GetEntities · CreatePickup · CreateHorse · the World entities group of the index
