function Trig_Function1_Func001Func001Func001Func009002001003 takes nothing returns boolean
return ( GetFilterUnit() != udg_arrow_projektil[GetForLoopIndexA()] )
endfunction
function Trig_Function1_Func001Func001Func001Func010C takes nothing returns boolean
if ( not ( udg_arrow_target[GetForLoopIndexA()] != null ) ) then
return false
endif
if ( not ( udg_arrow_target[GetForLoopIndexA()] != udg_arrow_caster[GetForLoopIndexA()] ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(udg_arrow_target[GetForLoopIndexA()]) == false ) ) then
return false
endif
return true
endfunction
function Trig_Function1_Func001Func001Func001C takes nothing returns boolean
if ( not ( udg_arrow_distance[GetForLoopIndexA()] < udg_MaxDistance[GetForLoopIndexA()] ) ) then
return false
endif
return true
endfunction
function Trig_Function1_Func001Func001C takes nothing returns boolean
if ( not ( udg_arrow_bolean[GetForLoopIndexA()] == true ) ) then
return false
endif
return true
endfunction
function Trig_Function1_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Function1_Func001Func001C() ) then
if ( Trig_Function1_Func001Func001Func001C() ) then
set udg_arrow_distance[GetForLoopIndexA()] = ( udg_arrow_distance[GetForLoopIndexA()] + udg_MaxSpeed[GetForLoopIndexA()] )
call SetUnitPositionLoc( udg_arrow_projektil[GetForLoopIndexA()], PolarProjectionBJ(GetUnitLoc(udg_arrow_projektil[GetForLoopIndexA()]), udg_MaxSpeed[GetForLoopIndexA()], GetUnitFacing(udg_arrow_projektil[GetForLoopIndexA()])) )
set udg_arrow_target[GetForLoopIndexA()] = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(55.00, GetUnitLoc(udg_arrow_projektil[GetForLoopIndexA()]), Condition(function Trig_Function1_Func001Func001Func001Func009002001003)))
if ( Trig_Function1_Func001Func001Func001Func010C() ) then
call PlaySoundOnUnitBJ( gg_snd_MetalLightSliceFlesh, 100, udg_arrow_projektil[GetForLoopIndexA()] )
call UnitDamageTargetBJ( udg_arrow_caster[GetForLoopIndexA()], udg_arrow_target[GetForLoopIndexA()], GetRandomReal(1.00, 2.00), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_arrow_target[GetForLoopIndexA()], "Objects\\Spawnmodels\\Orc\\Orcblood\\OrdBloodWyvernRider.mdl" )
call UnitApplyTimedLifeBJ( 0.01, 'BTLF', udg_arrow_projektil[GetForLoopIndexA()] )
set udg_arrow_projektil[GetForLoopIndexA()] = null
set udg_knockback_target[GetForLoopIndexA()] = udg_arrow_target[GetForLoopIndexA()]
set udg_knockback_integer[GetForLoopIndexA()] = 8.00
set udg_knockback_bolean[GetForLoopIndexA()] = true
set udg_arrow_bolean[GetForLoopIndexA()] = false
set udg_arrow_distance[GetForLoopIndexA()] = 0.00
call SetUnitTimeScalePercent( udg_arrow_caster[GetForLoopIndexA()], 100.00 )
else
endif
else
call UnitApplyTimedLifeBJ( 0.01, 'BTLF', udg_arrow_projektil[GetForLoopIndexA()] )
set udg_arrow_projektil[GetForLoopIndexA()] = null
set udg_arrow_bolean[GetForLoopIndexA()] = false
set udg_arrow_distance[GetForLoopIndexA()] = 0.00
call SetUnitTimeScalePercent( udg_arrow_caster[GetForLoopIndexA()], 100.00 )
endif
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Function1 takes nothing returns nothing
set gg_trg_Function1 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Function1, 0.01 )
call TriggerAddAction( gg_trg_Function1, function Trig_Function1_Actions )
endfunction