StopNpcAnim: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Release G1R:MP 0.1.5 BUILD144 / Protocol 37; update availability and migration
Release 0.1.9 / BUILD264 / Protocol42: availability and download setup; preserve experimental limits
 
(One intermediate revision by the same user not shown)
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.
* Since 0.1.5. Use the matching 0.1.5 client and server (Protocol 37).
* 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.''' 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 -->

Latest revision as of 13:30, 20 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. 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.