StopMonsterMovement
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
walkMonsterTocommand and pending return-home movement, then publishes a reliable stationary state. - An explicit stop does not emit
onMonsterMoveCompleteand 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.