DestroyMonster
Jump to navigation
Jump to search
destroyMonster
Removes a server-owned monster and replicates its removal.
Syntax
bool destroyMonster(string monsterId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
monsterId |
string |
yes | The opaque decimal monster identifier returned by spawnMonster or getMonsters.
|
Returns
Returns true when the monster existed and was removed; otherwise returns false.
Examples
Remove a scripted monster:
destroyMonster(monsterId)
Notes
- Available only in server-side resource scripts.
- This emits
onMonsterDestroy.