- Joined
- Sep 9, 2007
- Messages
- 6,759
JASS:
function FB_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetSpellTargetLoc()
local real x
local real y
local real X
local real Y
local integer loop1int = 0
local integer loop1end = 1
local location h
local effect e
local location o
local real f
local real r
set X = GetUnitX(u)
set Y = GetUnitY(u)
set h = Location(X,Y)
set loop1end = R2I(DistanceBetweenPoints(h,l) / 64.00)
set f = AngleBetweenPoints(h,l)
call RemoveLocation(h)
call RemoveLocation(l)
call DisplayTextToPlayer(Player(0),0,0,I2S(loop1int))
call DisplayTextToPlayer(Player(0),0,0,I2S(loop1end))
set loop1int = 0
loop
exitwhen loop1int > loop1end
set loop1int = loop1int + 1
set r = r + 64.00
set o = Location(X,Y)
set h = PolarProjectionBJ(o,r,f)
set x = GetLocationX(h)
set y = GetLocationY(h)
call RemoveLocation(h)
call RemoveLocation(o)
set e = AddSpecialEffect("Abilities\\Weapons\\ZigguratFrostMissile\\ZigguratFrostMissile.mdl",x,y)
call TriggerSleepAction(0.10)
call DestroyEffect(e)
call DisplayTextToPlayer(Player(0),0,0,I2S(loop1int))
endloop
call DisplayTextToPlayer(Player(0),0,0,"Cleared!")
set u = null
endfunction
function FB_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00J'
endfunction
//===========================================================================
function InitTrig_FB takes nothing returns nothing
local trigger gg_trg_FB = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FB, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_FB, Condition( function FB_Conditions ) )
call TriggerAddAction( gg_trg_FB, function FB_Actions )
endfunction
why doesn't this work? I've tried many things, the spell is based of shockwave and everything works, exepct that it stops at the loop?!?!?!