GetNpcCombatMovement
Jump to navigation
Jump to search
getNpcCombatMovement
AVAILABLE FROM UPDATE 0.1.5
This function is available in G1R:MP 0.1.5 and later. The contract below includes the compatibility guarantees introduced in that update.
Reads current NPC combat pursuit settings.
Syntax
getNpcCombatMovement(npcId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
npcId |
int |
yes | Server-assigned NPC ID returned by spawnNpc; not a player ID. |
Returns
Returns table {chase, mode, speed}, or false. speed uses metres per second.
Examples
local movement = getNpcCombatMovement(npcId)
Notes
- Server-side only. Mutations require the NPC to belong to the calling resource; getters do not grant control.
- Since 0.1.5. Use the matching 0.1.5 client and server (Protocol 37).
- Use matching updated client and server. See NPC scripting for lifecycle, defaults, combat examples and collision limitations.
- Independent of route/move-goal speed and pause.