OnPlayerSpellProjectileCreate

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

onPlayerSpellProjectileCreate

Triggered when the server creates an authoritative spell projectile.

Availability

This event is available in server-side scripts.

Callback signature

onPlayerSpellProjectileCreate(ownerPlayerId, projectileId, castId, spellKey, spellId, x, y, z)

Parameters

Name Type Description
ownerPlayerId int The casting player ID.
projectileId int The authoritative projectile ID.
castId int The originating cast ID.
spellKey string The spell definition key.
spellId int The numeric spell ID.
x number Projectile origin X in metres.
y number Projectile origin Y in metres.
z number Projectile origin Z in metres.

Examples

Handle the event:

addEventHandler("onPlayerSpellProjectileCreate", root, function(ownerPlayerId, projectileId, castId, spellKey, spellId, x, y, z)
    outputDebugString("Projectile " .. projectileId .. " created for " .. spellKey)
end)