DestroyMonster: Difference between revisions
Jump to navigation
Jump to search
Document server-owned monsters and interactions |
Complete Lua function catalog |
||
| Line 28: | Line 28: | ||
* This emits <code>onMonsterDestroy</code>. | * This emits <code>onMonsterDestroy</code>. | ||
[[Category:Lua Functions]] | |||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:World Functions]] | [[Category:World Functions]] | ||
[[Category:Monster Functions]] | [[Category:Monster Functions]] | ||
Latest revision as of 09:52, 15 August 2026
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.