AddSpellEffectById

Parameters
abilityId integer
t effecttype
x real
y real
comment

Creates the special effect in point with coordinates (x;y) with Z = 0 using the model file from the Object Editor field of type t from the ability, unit or buff (works with all these types, though the name states it's ability-only function) with raw code abilityId. If this field has more than one effect inside, it will only create the first effect stated in the field, ignoring all others.

Example (Lua):

Create an effect based on unit's attack missile model ('hsor' is human Sorceress):

atkEffect = AddSpellEffectById(FourCC("hsor"), EFFECT_TYPE_MISSILE, 0, 0)
note

In older patches to create an effect with a Z-position other than zero see https://www.hiveworkshop.com/threads/function-to-create-effect-at-z.165250/#post-1561722. In 1.29.2.9231 and newer use BlzSetSpecialEffectPosition or BlzSetSpecialEffectZ.

patch

1.00

Source
common.j
return type
effect
Source code
native AddSpellEffectById           takes integer abilityId, effecttype t,real x, real y returns effect