OnNpcRouteComplete

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search

onNpcRouteComplete

Triggered when a non-looping scripted NPC route finishes.

Availability

This event is available in server-side scripts.

Callback signature

onNpcRouteComplete(npcId)

Parameters

Name Type Description
npcId int The NPC identifier whose route completed.

Examples

Handle the event:

addEventHandler("onNpcRouteComplete", root, function(npcId)
    outputDebugString("NPC " .. npcId .. " completed its route")
end)

Notes

  • Looping routes emit route-point events but do not complete until replaced or cleared.