I expect 10 green special effects of the same size.
(lua code)
What I get is that they vary in scaling (despite that I set scaling to 2).
Also divine shield grew bigger for some reason.
The commented line works fine but it's not attached to the unit. How do I make this work?
(p.s. how do I highlight lua code, not vjass)
(lua code)
JASS:
function spell()
local trig = CreateTrigger()
TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT)
TriggerAddAction(trig, function()
if GetSpellAbilityId() ~= FourCC('A000') then return end
local u = GetTriggerUnit()
local sfs = {}
for j=1,10,1 do
print('iteration', j)
sfs[j] = AddSpecialEffectTarget('Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl', u, 'origin')
--sfs[j] = AddSpecialEffect('Abilities\\Spells\\Orc\\SpiritLink\\SpiritLinkTarget.mdl', GetUnitX(u), GetUnitY(u))
BlzSetSpecialEffectScale(sfs[j], 2)
BlzSetSpecialEffectColor(sfs[j], 0, 255, 0)
PolledWait(0.1)
end
end)
end
What I get is that they vary in scaling (despite that I set scaling to 2).
Also divine shield grew bigger for some reason.
The commented line works fine but it's not attached to the unit. How do I make this work?
(p.s. how do I highlight lua code, not vjass)