See. in this trigger below i have made a unit fly up, and when he is busy flying up it is busy creating BreathOfFireDamage.mdl Model
on the unit.
the thing is what i want help with is how do i make 10 BreathOfFireDamage.mdl models Deleted all 10 at the same time after the unit
comes back to the ground. Can
anyone help?? function Trig_Rise_Conditions takes nothing returns boolean
if ( not ( 'A000' == GetSpellAbilityId() ) ) then
return false
endif
return true
endfunction
function Trig_Rise_Actions takes nothing returns nothing
call SetUnitScalePercent( GetTriggerUnit(), 50.00, 50.00, 50.00 )
call SetUnitFlyHeightBJ( GetTriggerUnit(), 350.00, 100.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AddSpecialEffectTargetUnitBJ( "origin", GetTriggerUnit(), "Abilities\\Spells\\Other\\BreathOfFire\\BreathOfFireDamage.mdl" )
call TriggerSleepAction( 0.05 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call SetUnitFlyHeightBJ( GetTriggerUnit(), 0.00, 100.00 )
endfunction
//===========================================================================
function InitTrig_Rise takes nothing returns nothing
set gg_trg_Rise = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rise, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Rise, Condition( function Trig_Rise_Conditions ) )
call TriggerAddAction( gg_trg_Rise, function Trig_Rise_Actions )
endfunction