IsMonsterAggressive

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:54, 15 August 2026 by QCherry (talk | contribs) (Complete Lua function catalog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

isMonsterAggressive

Checks whether a server-owned monster may autonomously acquire and attack players.

Syntax

bool isMonsterAggressive(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 exists and aggression is enabled; otherwise returns false.

Examples

Inspect aggression:

if isMonsterAggressive(monsterId) then
    outputDebugString("Monster is hostile")
end

Notes

  • Available only in server-side resource scripts.