GetMonsterType
Jump to navigation
Jump to search
getMonsterType
Returns the catalog type of a server-owned monster.
Syntax
string getMonsterType(string monsterId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
monsterId |
string |
yes | The opaque decimal monster identifier returned by spawnMonster or getMonsters.
|
Returns
Returns the monster type key, or an empty string when the identifier is invalid.
Examples
Check for a wolf:
if getMonsterType(monsterId) == "wolf" then
outputDebugString("A wolf is nearby")
end
Notes
- Available only in server-side resource scripts.