OnMonsterMoveComplete

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 18:41, 3 September 2026 by QCherry (talk | contribs) (Document Lua events available or improved from G1R:MP 0.1.2)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

onMonsterMoveComplete

AVAILABLE FROM UPDATE 0.1.2
This event is available in G1R:MP 0.1.2 and later. The contract below includes the compatibility guarantees introduced in that update.

Triggered once when a resource-owned monster reaches its direct scripted movement goal.

Availability

This event is available in server-side scripts.

Callback signature

onMonsterMoveComplete(monsterId)

Parameters

Name Type Description
monsterId string The 64-bit monster identifier that reached its goal.

Examples

Handle the event:

addEventHandler("onMonsterMoveComplete", resourceRoot, function(monsterId)
    outputDebugString("Monster " .. monsterId .. " reached its scripted goal")
end)

Notes

  • This owner-only event is delivered to the creating resource's resourceRoot, not broadcast to unrelated resources.
  • It is emitted only for a setMonsterMoveGoal arrival. Explicit stops and mode changes clear the goal without emitting completion.
  • Completion is an edge event; scripts should not poll position every server tick.