OnNpcRoutePoint

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

onNpcRoutePoint

Triggered when a scripted NPC reaches a route point.

Availability

This event is available in server-side scripts.

Callback signature

onNpcRoutePoint(npcId, pointIndex)

Parameters

Name Type Description
npcId int The NPC identifier.
pointIndex int The one-based route point index reached by the NPC.

Examples

Handle the event:

addEventHandler("onNpcRoutePoint", root, function(npcId, pointIndex)
    outputDebugString("NPC " .. npcId .. " reached route point " .. pointIndex)
end)

Notes

  • A point's waitMs delay begins before movement continues.