destroyEntity
Script::destroyEntity
Destroys an Entity.
Declaration
void destroyEntity(Entity entity);
Parameters
Name |
Type |
Description |
---|---|---|
entity |
The Entity to destroy. |
Returns
None.
Notes
If the Entity is self-destructing, which means that this function’s parameter is the Entity’s own identifier, for example:
destroyEntity(entityID);
The rest of the script must not reference any function or variable belonging to this Entity. It is safer to return
right after self-destructing:
destroyEntity(entityID);
return;