OnMonsterDestroy

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 22:31, 14 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

onMonsterDestroy

Triggered after a synchronized monster is removed from the server world.

Availability

This event is available in server-side scripts.

Callback signature

onMonsterDestroy(monsterId, sourceResource)

Parameters

Name Type Description
monsterId string The removed monster ID.
sourceResource string The resource that requested removal.

Examples

Handle the event:

addEventHandler("onMonsterDestroy", root, function(monsterId, sourceResource)
    outputDebugString("Removed monster " .. monsterId)
end)