Method GameObject:CastSpell [-] [+]

Casts a spell from the GameObject.

If target is nil, the spell is cast at the GameObject's position (useful for area-of-effect spells like floor eruptions).

Synopsis

GameObject:CastSpell( target, spellId )

Arguments

Unit target (nil)

Spell target, or nil for positional cast.

number spellId

Spell entry ID.

Valid numbers: integers from 0 to 4,294,967,295.

Returns

Nothing.

Generated on
©2026 - ALE Lua Engine