GetMonsterType: Difference between revisions
Jump to navigation
Jump to search
Document server-owned monsters and interactions |
Complete Lua function catalog |
||
| Line 29: | Line 29: | ||
* Available only in server-side resource scripts. | * Available only in server-side resource scripts. | ||
[[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
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.