IsMonsterAlive
isMonsterAlive
Checks whether a server-owned monster is alive.
Syntax
bool isMonsterAlive(string monsterId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
monsterId |
string |
yes | The opaque decimal monster identifier returned by spawnMonster or getMonsters.
|
Returns
Returns true only for an existing living monster; otherwise returns false.
Examples
Wait for a monster to be defeated:
if not isMonsterAlive(monsterId) then
outputDebugString("Encounter complete")
end
Notes
- Available only in server-side resource scripts.