OnPlayerSpellProjectileDestroy

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

onPlayerSpellProjectileDestroy

Triggered when an authoritative spell projectile is removed.

Availability

This event is available in server-side scripts.

Callback signature

onPlayerSpellProjectileDestroy(ownerPlayerId, projectileId, reason)

Parameters

Name Type Description
ownerPlayerId int The casting player ID.
projectileId int The removed projectile ID.
reason int The protocol cleanup reason code.

Examples

Handle the event:

addEventHandler("onPlayerSpellProjectileDestroy", root, function(ownerPlayerId, projectileId, reason)
    outputDebugString("Spell projectile " .. projectileId .. " removed, reason=" .. reason)
end)

Notes

  • Reason codes are protocol values and may gain new cases; handle unknown values safely.