SetMonsterPosition: Difference between revisions
Jump to navigation
Jump to search
Document server-owned monsters and interactions |
Complete Lua function catalog |
||
| Line 36: | Line 36: | ||
* Interested clients receive the updated state through monster relevance replication. | * Interested clients receive the updated state through monster relevance replication. | ||
[[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:55, 15 August 2026
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.