- Joined
- Aug 21, 2008
- Messages
- 533
i made a spell with jass which was working perfectly since i added a wait
Now its like the loop only isnt there and just one flamestrike is created...
JASS:
function Trig_angry_strike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00V' ) ) then
return false
endif
return true
endfunction
function Trig_angry_strike_Actions takes nothing returns nothing
local location x = GetUnitLoc(GetTriggerUnit())
local location y = GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 24
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set y = PolarProjectionBJ(x, ( 700.00 - ( I2R(GetForLoopIndexA()) * 25.00 ) ), ( I2R(GetForLoopIndexA()) * ( I2R(GetForLoopIndexA()) + 5.00 ) ))
call CreateNUnitsAtLoc( 1, 'n003', Player(10), y, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A00W', GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "flamestrike", y )
call TriggerSleepAction( 2 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_angry_strike takes nothing returns nothing
set gg_trg_angry_strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_angry_strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_angry_strike, Condition( function Trig_angry_strike_Conditions ) )
call TriggerAddAction( gg_trg_angry_strike, function Trig_angry_strike_Actions )
endfunction
Now its like the loop only isnt there and just one flamestrike is created...