SetNpcPaused

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:55, 15 August 2026 by QCherry (talk | contribs) (Complete Lua function catalog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setNpcPaused

Pauses or resumes route movement for a resource-owned NPC.

Syntax

bool setNpcPaused(int npcId, bool paused)

Parameters

Name Type Required Description
npcId int yes The server-assigned NPC identifier returned by spawnNpc or getNpcs.
paused bool yes True to pause movement or false to resume it.

Returns

Returns true when the pause state is accepted; otherwise returns false.

Examples

Pause an NPC during dialogue:

setNpcPaused(npcId, true)
-- Resume after the dialogue.
setNpcPaused(npcId, false)

Notes

  • Available only in server-side resource scripts.
  • Pausing preserves the assigned route and current route index.