DestroyMonster

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 04:25, 14 August 2026 by QCherry (talk | contribs) (Document server-owned monsters and interactions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.