function Trig_SS_2_____________________u_Conditions takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_TempGroup[2]) == false ) ) then
return false
endif
return true
endfunction
function Trig_SS_2_____________________u_Func002Func002Func001C takes nothing returns boolean
if ( not ( udg_TempDistance2[udg_CV] >= ( udg_TempDistance1[udg_CV] - 500.00 ) ) ) then
return false
endif
if ( not ( udg_TempDistance2[udg_CV] <= ( udg_TempDistance1[udg_CV] - 380.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_SS_2_____________________u_Func002Func002C takes nothing returns boolean
if ( not ( udg_TempDistance2[udg_CV] >= udg_TempDistance1[udg_CV] ) ) then
return false
endif
return true
endfunction
function Trig_SS_2_____________________u_Func002A takes nothing returns nothing
set udg_CV = GetUnitUserData(GetEnumUnit())
if ( Trig_SS_2_____________________u_Func002Func002C() ) then
call PlaySoundOnUnitBJ( gg_snd_SnapDragonMissileLaunch1, 100, udg_Target[udg_CV] )
call PauseUnitBJ( false, udg_Caster1[udg_CV] )
call PauseUnitBJ( false, udg_Target[udg_CV] )
call SetUnitPathing( udg_Caster1[udg_CV], true )
// ------------------------------------------
call SetUnitTimeScalePercent( udg_Caster1[udg_CV], 100.00 )
call DestroyEffectBJ( udg_TempSE[udg_CV] )
call ResetUnitAnimation( udg_Caster1[udg_CV] )
call GroupRemoveUnitSimple( udg_Caster1[udg_CV], udg_TempGroup[2] )
// ------------------------------------------
set udg_TempDistance2[udg_CV] = 0.00
set udg_Damage[udg_CV] = 0.00
else
if ( Trig_SS_2_____________________u_Func002Func002Func001C() ) then
set udg_TempDistance2[udg_CV] = ( udg_TempDistance2[udg_CV] + 120.00 )
set udg_TempPoint1[udg_CV] = GetUnitLoc(GetEnumUnit())
set udg_TempPoint2[udg_CV] = PolarProjectionBJ(udg_TempPoint1[udg_CV], 120.00, GetUnitFacing(GetEnumUnit()))
// ------------------------------------------
call SetUnitPositionLoc( GetEnumUnit(), udg_TempPoint2[udg_CV] )
call PlaySoundOnUnitBJ( gg_snd_MetalLightSliceFlesh1, 100, udg_Target[udg_CV] )
call AddSpecialEffectLocBJ( udg_TempPoint1[udg_CV], "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call UnitDamageTargetBJ( udg_Caster1[udg_CV], udg_Target[udg_CV], udg_Damage[udg_CV], ATTACK_TYPE_CHAOS, DAMAGE_TYPE_FIRE )
// ------------------------------------------
call AddSpecialEffectTargetUnitBJ( "origin", udg_Target[udg_CV], "BloodExplosion.mdx" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 1.00, "ReplaceableTextures\\CameraMasks\\DiagonalSlash_mask.blp", 100.00, 0.00, 0.00, 0 )
// ------------------------------------------
call CreateTextTagUnitBJ( I2S(R2I(udg_Damage[udg_CV])), udg_Target[udg_CV], 0, 10, 100, 100, 100, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false )
call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 1.00 )
// ------------------------------------------
call RemoveLocation(udg_TempPoint1[udg_CV])
call RemoveLocation(udg_TempPoint2[udg_CV])
else
set udg_TempDistance2[udg_CV] = ( udg_TempDistance2[udg_CV] + 120.00 )
set udg_TempPoint1[udg_CV] = GetUnitLoc(GetEnumUnit())
set udg_TempPoint2[udg_CV] = PolarProjectionBJ(udg_TempPoint1[udg_CV], 120.00, GetUnitFacing(GetEnumUnit()))
// ------------------------------------------
call SetUnitPositionLoc( GetEnumUnit(), udg_TempPoint2[udg_CV] )
call AddSpecialEffectLocBJ( udg_TempPoint1[udg_CV], "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call DisableTrigger( GetTriggeringTrigger() )
// ------------------------------------------
call RemoveLocation(udg_TempPoint1[udg_CV])
call RemoveLocation(udg_TempPoint2[udg_CV])
endif
endif
endfunction
function Trig_SS_2_____________________u_Actions takes nothing returns nothing
call ForGroupBJ( udg_TempGroup[2], function Trig_SS_2_____________________u_Func002A )
endfunction
//===========================================================================
function InitTrig_SS_2_____________________u takes nothing returns nothing
set gg_trg_SS_2_____________________u = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_SS_2_____________________u, 0.05 )
call TriggerAddCondition( gg_trg_SS_2_____________________u, Condition( function Trig_SS_2_____________________u_Conditions ) )
call TriggerAddAction( gg_trg_SS_2_____________________u, function Trig_SS_2_____________________u_Actions )
endfunction