StopMonsterMovement

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 18:40, 3 September 2026 by QCherry (talk | contribs) (Document Lua APIs available or improved from G1R:MP 0.1.2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

stopMonsterMovement

AVAILABLE FROM UPDATE 0.1.2
This function is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.

Stops a resource-owned monster and clears its active movement goal without changing its navigation mode.

Syntax

bool stopMonsterMovement(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 stop is accepted; otherwise returns false.

Examples

Cancel a direct monster goal:

stopMonsterMovement(monsterId)

Notes

  • Available only in server-side resource scripts.
  • Only the resource that created the monster may stop it.
  • The call clears a scripted goal, a legacy walkMonsterTo command and pending return-home movement, then publishes a reliable stationary state.
  • An explicit stop does not emit onMonsterMoveComplete and does not change the selected navigation mode, target, aggression or authoritative combat state.
  • In "builtin" mode the server AI may choose a later movement goal. Switch to "scripted" first when a resource must retain movement control.