SetMonsterPosition

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 04:26, 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

setMonsterPosition

Moves a server-owned monster to an authoritative world position.

Syntax

bool setMonsterPosition(string monsterId, number x, number y, number z [, number yaw = 0])

Parameters

Name Type Required Description
monsterId string yes The opaque decimal monster identifier returned by spawnMonster or getMonsters.
x number yes World X coordinate in metres.
y number yes World Y coordinate in metres.
z number yes World Z coordinate in metres.
yaw number no Yaw in degrees.

Returns

Returns true when the authoritative move is accepted; otherwise returns false.

Examples

Move a monster to a guard point:

setMonsterPosition(monsterId, 25.0, 12.0, 3.0, 180)

Notes

  • Available only in server-side resource scripts.
  • Interested clients receive the updated state through monster relevance replication.