StopNpcAnim: Difference between revisions
Jump to navigation
Jump to search
Release G1R:MP 0.1.5 BUILD144 / Protocol 37; update availability and migration |
Document upcoming 0.1.9 activity animations: 844 aliases, fishing, player/NPC Lua usage and qualification; not a release |
||
| Line 29: | Line 29: | ||
== Notes == | == Notes == | ||
* Server-side only. Mutations require the NPC to belong to the calling resource; getters do not grant control. | * Server-side only. Mutations require the NPC to belong to the calling resource; getters do not grant control. | ||
* | * The function was introduced in 0.1.5. Use matching supported client/server versions; new 0.1.9 aliases require that update on both. | ||
* Use matching updated client and server. See [[NPC scripting]] for lifecycle, defaults, combat examples and collision limitations. | * Use matching updated client and server. See [[NPC scripting]] for lifecycle, defaults, combat examples and collision limitations. | ||
* Idempotent stop; original route/goal can resume without catching up suspended wait time. | * Idempotent stop; original route/goal can resume without catching up suspended wait time. | ||
| Line 36: | Line 36: | ||
[[Category:Server Functions]] | [[Category:Server Functions]] | ||
[[Category:NPC Functions]] | [[Category:NPC Functions]] | ||
<!-- activities019:start --> | |||
== Activity cleanup from 0.1.9 == | |||
'''Available from 0.1.9 (upcoming; not yet publicly released).''' Not included in public 0.1.8. Both the server and observing clients need the matching update. | |||
Use <code>stopNpcAnim(npcId)</code> for the new work/fishing/rest loops and held poses. It cleans up their animation-owned props without deleting NPC equipment or scenery. Resource ownership and route-resumption behavior remain unchanged. See [[Activity animations]]. | |||
<!-- activities019:end --> | |||
Revision as of 09:18, 19 October 2026
stopNpcAnim
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.
Stops the NPC scripted animation.
Syntax
stopNpcAnim(npcId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
npcId |
int |
yes | Server-assigned NPC ID returned by spawnNpc; not a player ID. |
Returns
Returns true when accepted, false for a rejected request. Acceptance is not proof of a rendered animation, projectile release or hit.
Examples
stopNpcAnim(npcId)
Notes
- Server-side only. Mutations require the NPC to belong to the calling resource; getters do not grant control.
- The function was introduced in 0.1.5. Use matching supported client/server versions; new 0.1.9 aliases require that update on both.
- Use matching updated client and server. See NPC scripting for lifecycle, defaults, combat examples and collision limitations.
- Idempotent stop; original route/goal can resume without catching up suspended wait time.
Activity cleanup from 0.1.9
Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Both the server and observing clients need the matching update.
Use stopNpcAnim(npcId) for the new work/fishing/rest loops and held poses. It cleans up their animation-owned props without deleting NPC equipment or scenery. Resource ownership and route-resumption behavior remain unchanged. See Activity animations.