OnNpcRoutePoint
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.