Shockwave

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Shockwave (Trigger)

Actions


-------- ------------------------------------------------------------ --------


Set SW_Max = (SW_Max + 1)


Set SW_Caster[SW_Max] = (Triggering unit)


Set SW_Point[0] = (Position of (Triggering unit))


Set SW_Point[1] = (Target point of ability being cast)


Set SW_Lvl[SW_Max] = (Level of (Ability being cast) for (Triggering unit))


-------- ------------------------------------------------------------ --------


Set SW_WaveEffect[SW_Max] = Abilities\Spells\Orc\Shockwave\ShockwaveMissile.mdl


-------- Declares what Sfx will the Shockwave be based on. --------


Set SW_WaveEffectEnd[SW_Max] = Abilities\Spells\Other\Doom\DoomDeath.mdl


-------- Declares what Sfx will played when the Shockwave reaches its max distance. --------


Set SW_LoopingSfx[SW_Max] = False


-------- If set to True, it will allow the Shockwave to display a looping Sfx. It requires declaration of "SW_WaveEffectLoop". --------


-------- An example of the "SW_WaveEffectLoop" can be found in the Incineration Wave trigger. --------


Set SW_ExtraEffectCheck[SW_Max] = False


-------- If set to True, it will allow the Shockwave to do a specific effect. It requires declaration of "SW_ExtraEffect". --------


-------- An example of the "SW_ExtraEffect" can be found in the Silence Wave trigger. --------


Set SW_ExtraEffectTargetCheck[SW_Max] = False


-------- If set to True, it will allow the Shockwave to do a specific effect on an affected. It requires declaration of "SW_ExtraEffectTarget". --------


-------- An example of the "SW_ExtraEffectTarget" can be found in the Carrion Swarm trigger. --------


Set SW_AffectAlly[SW_Max] = False


Set SW_AffectEnemy[SW_Max] = True


Set SW_AffectAir[SW_Max] = False


Set SW_AffectGround[SW_Max] = True


Set SW_AffectStructure[SW_Max] = False


-------- Allows selection of which units will be affected by the Shockwave. --------


Set SW_OneInstance[SW_Max] = False


-------- If set to True, then the instance of the effect/damage to a unit will only be once. --------


Set SW_AttackType[SW_Max] = Spells


-------- Determines what kind of attack type the Shockwave will do. --------


Set SW_DamageType[SW_Max] = Magic


-------- Determines what kind of damage type the Shockwave will do. --------


Set SW_Attachment = origin


-------- Determines where the Shockwave Sfx will be attached to from the Dummy. Only used for giving some height to the wave. --------


Set SW_Damage[1] = 10.00


Set SW_Damage[2] = 20.00


Set SW_Damage[3] = 30.00


-------- Determines the amount of damage dealt. --------


Set SW_AreaInitial[1] = 125.00


Set SW_AreaInitial[2] = 125.00


Set SW_AreaInitial[3] = 125.00


-------- Determines the initial area of the Shockwave. --------


Set SW_AreaFinal[1] = 125.00


Set SW_AreaFinal[2] = 125.00


Set SW_AreaFinal[3] = 125.00


-------- Determines the final area of the Shockwave. --------


Set SW_Speed[1] = 1050.00


Set SW_Speed[2] = 1050.00


Set SW_Speed[3] = 1050.00


-------- Determines the speed of the Shockwave. --------


Set SW_Distance[1] = 400.00


Set SW_Distance[2] = 1000.00


Set SW_Distance[3] = 1800.00


-------- Determines the max distance that the Shockwave will travel. --------


Trigger - Run Shockwave Cast <gen> (ignoring conditions)
Carrion Swarm

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Carrion Swarm (Trigger)

Actions


Set SW_Max = (SW_Max + 1)


Set SW_Caster[SW_Max] = (Triggering unit)


Set SW_Point[0] = (Position of (Triggering unit))


Set SW_Point[1] = (Target point of ability being cast)


Set SW_Lvl[SW_Max] = (Level of (Ability being cast) for (Triggering unit))


Set SW_WaveEffect[SW_Max] = Abilities\Spells\Undead\CarrionSwarm\CarrionSwarmMissile.mdl


Set SW_WaveEffectEnd[SW_Max] = <Empty String>


Set SW_LoopingSfx[SW_Max] = False


Set SW_ExtraEffectTargetCheck[SW_Max] = True


Set SW_ExtraEffectTarget[SW_Max] = Carrion Swarm Heal <gen>


Set SW_AffectAlly[SW_Max] = True


Set SW_AffectEnemy[SW_Max] = True


Set SW_AffectAir[SW_Max] = True


Set SW_AffectGround[SW_Max] = True


Set SW_AffectStructure[SW_Max] = False


Set SW_OneInstance[SW_Max] = True


Set SW_AttackType[SW_Max] = Spells


Set SW_DamageType[SW_Max] = Magic


Set SW_Attachment = origin


Set SW_Damage[1] = 100.00


Set SW_Damage[2] = 200.00


Set SW_Damage[3] = 300.00


Set SW_AreaInitial[1] = 100.00


Set SW_AreaInitial[2] = 100.00


Set SW_AreaInitial[3] = 100.00


Set SW_AreaFinal[1] = 500.00


Set SW_AreaFinal[2] = 500.00


Set SW_AreaFinal[3] = 500.00


Set SW_Speed[1] = 1100.00


Set SW_Speed[2] = 1100.00


Set SW_Speed[3] = 1100.00


Set SW_Distance[1] = 800.00


Set SW_Distance[2] = 800.00


Set SW_Distance[3] = 800.00


Trigger - Run Shockwave Cast <gen> (ignoring conditions)
Carrion Swarm Heal

Events

Conditions


(TempUnit belongs to an ally of (Owner of SW_Caster[SW_Loop])) Equal to True

Actions


Unit - Set life of TempUnit to ((Life of TempUnit) + 200.00)


Special Effect - Create a special effect attached to the origin of TempUnit using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl


Special Effect - Destroy (Last created special effect)
Incineration Wave

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Incineration Wave (Trigger)

Actions


Set SW_Max = (SW_Max + 1)


Set SW_Caster[SW_Max] = (Triggering unit)


Set SW_Point[0] = (Position of (Triggering unit))


Set SW_Point[1] = (Target point of ability being cast)


Set SW_Lvl[SW_Max] = (Level of (Ability being cast) for (Triggering unit))


Set SW_WaveEffect[SW_Max] = <Empty String>


Set SW_WaveEffectEnd[SW_Max] = <Empty String>


Set SW_WaveEffectLoop[SW_Max] = Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl


Set SW_LoopingSfx[SW_Max] = True


Set SW_ExtraEffectTargetCheck[SW_Max] = True


Set SW_ExtraEffectTarget[SW_Max] = Incineration Wave Extra <gen>


Set SW_AffectAlly[SW_Max] = False


Set SW_AffectEnemy[SW_Max] = True


Set SW_AffectAir[SW_Max] = True


Set SW_AffectGround[SW_Max] = True


Set SW_AffectStructure[SW_Max] = False


Set SW_OneInstance[SW_Max] = True


Set SW_AttackType[SW_Max] = Spells


Set SW_DamageType[SW_Max] = Magic


Set SW_Damage[1] = 50.00


Set SW_Damage[2] = 100.00


Set SW_Damage[3] = 150.00


Set SW_AreaInitial[1] = 100.00


Set SW_AreaInitial[2] = 100.00


Set SW_AreaInitial[3] = 100.00


Set SW_AreaFinal[1] = 100.00


Set SW_AreaFinal[2] = 100.00


Set SW_AreaFinal[3] = 100.00


Set SW_Speed[1] = 1500.00


Set SW_Speed[2] = 1500.00


Set SW_Speed[3] = 1500.00


Set SW_Distance[1] = 900.00


Set SW_Distance[2] = 1350.00


Set SW_Distance[3] = 1800.00


Trigger - Run Shockwave Cast <gen> (ignoring conditions)
Incineration Wave Extra

Events

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Incineration Wave (Stun) for SW_Dummy[SW_Loop]) Equal to 0



Then - Actions




Unit - Add Incineration Wave (Stun) to SW_Dummy[SW_Loop]



Else - Actions


Unit - Set level of Incineration Wave (Stun) for SW_Dummy[SW_Loop] to SW_Lvl[SW_Loop]


Custom script: call IssueTargetOrderById( udg_SW_Dummy[udg_SW_Loop], 852095, udg_TempUnit)
Silence Wave

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Silence Wave (Trigger)

Actions


Set SW_Max = (SW_Max + 1)


Set SW_Caster[SW_Max] = (Triggering unit)


Set SW_Point[0] = (Position of (Triggering unit))


Set SW_Point[1] = (Target point of ability being cast)


Set SW_Lvl[SW_Max] = (Level of (Ability being cast) for (Triggering unit))


Set SW_WaveEffect[SW_Max] = Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl


Set SW_WaveEffectEnd[SW_Max] = <Empty String>


Set SW_LoopingSfx[SW_Max] = False


Set SW_ExtraEffectCheck[SW_Max] = True


Set SW_ExtraEffect[SW_Max] = Silence Wave Extra <gen>


Set SW_ExtraEffectTargetCheck[SW_Max] = False


Set SW_AffectAlly[SW_Max] = True


Set SW_AffectEnemy[SW_Max] = True


Set SW_AffectAir[SW_Max] = True


Set SW_AffectGround[SW_Max] = True


Set SW_AffectStructure[SW_Max] = False


Set SW_OneInstance[SW_Max] = True


Set SW_AttackType[SW_Max] = Spells


Set SW_DamageType[SW_Max] = Universal


Set SW_Attachment = overhead


Set SW_Damage[1] = 200.00


Set SW_AreaInitial[1] = 100.00


Set SW_AreaFinal[1] = 100.00


Set SW_Speed[1] = 600.00


Set SW_Distance[1] = 800.00


Trigger - Run Shockwave Cast <gen> (ignoring conditions)
Silence Wave Extra

Events

Conditions

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Level of Silence (effect) for SW_Dummy[SW_Loop]) Equal to 0



Then - Actions




Unit - Add Silence (effect) to SW_Dummy[SW_Loop]



Else - Actions


Unit - Order SW_Dummy[SW_Loop] to Neutral Dark Ranger - Silence SW_NextPoint[1]
Shockwave Cast

Events

Conditions

Actions


Unit - Create 1 Dummy for (Owner of SW_Caster[SW_Max]) at SW_Point[0] facing SW_Point[1]


Set SW_Dummy[SW_Max] = (Last created unit)


Unit - Turn collision for SW_Dummy[SW_Max] Off


Set SW_AreaGrowth[SW_Max] = ((SW_AreaFinal[SW_Lvl[SW_Max]] - SW_AreaInitial[SW_Lvl[SW_Max]]) / ((1.00 / 0.03) x (SW_Distance[SW_Lvl[SW_Max]] / SW_Speed[SW_Lvl[SW_Max]])))


Set SW_AreaCurrent[SW_Max] = SW_AreaInitial[SW_Lvl[SW_Max]]


Special Effect - Create a special effect attached to the SW_Attachment of SW_Dummy[SW_Max] using SW_WaveEffect[SW_Max]


Set SW_Wave[SW_Max] = (Last created special effect)


Custom script: set udg_SW_GroupDone[udg_SW_Max] = CreateGroup()


Set SW_DistanceX[SW_Max] = SW_Distance[SW_Lvl[SW_Max]]


Set SW_SpeedX[SW_Max] = SW_Speed[SW_Lvl[SW_Max]]


Set SW_DamageX[SW_Max] = SW_Damage[SW_Lvl[SW_Max]]


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




SW_Max Equal to 1



Then - Actions




Trigger - Turn on Shockwave Loop <gen>



Else - Actions


Custom script: call RemoveLocation(udg_SW_Point[0])


Custom script: call RemoveLocation(udg_SW_Point[1])
Shockwave Loop

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer SW_Loop) from 1 to SW_Max, do (Actions)



Loop - Actions




Set SW_DistanceX[SW_Loop] = (SW_DistanceX[SW_Loop] - (SW_SpeedX[SW_Loop] / (1.00 / 0.03)))




Set SW_Angle = (Facing of SW_Dummy[SW_Loop])




Set SW_NextPoint[0] = (Position of SW_Dummy[SW_Loop])




Set SW_NextPoint[1] = (SW_NextPoint[0] offset by (SW_SpeedX[SW_Loop] / (1.00 / 0.03)) towards SW_Angle degrees)




Set SW_AreaCurrent[SW_Loop] = (SW_AreaCurrent[SW_Loop] + SW_AreaGrowth[SW_Loop])




Set SW_Group = (Units within SW_AreaCurrent[SW_Loop] of SW_NextPoint[1])




Unit - Move SW_Dummy[SW_Loop] instantly to SW_NextPoint[1], facing SW_Angle degrees




If (SW_ExtraEffectCheck[SW_Loop] Equal to True) then do (Trigger - Run SW_ExtraEffect[SW_Loop] (checking conditions)) else do (Do nothing)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






SW_LoopingSfx[SW_Loop] Equal to True





Then - Actions






Special Effect - Create a special effect at SW_NextPoint[0] using SW_WaveEffectLoop[SW_Loop]






Special Effect - Destroy (Last created special effect)





Else - Actions




Unit Group - Pick every unit in SW_Group and do (Actions)





Loop - Actions






Set TempUnit = (Picked unit)






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(TempUnit belongs to an enemy of (Owner of SW_Caster[SW_Loop])) Equal to SW_AffectEnemy[SW_Loop]








SW_AffectEnemy[SW_Loop] Equal to True








(TempUnit is in SW_GroupDone[SW_Loop]) Equal to False








Or - Any (Conditions) are true









Conditions










((TempUnit is A flying unit) Equal to SW_AffectAir[SW_Loop]) and (SW_AffectAir[SW_Loop] Equal to True)










((TempUnit is A ground unit) Equal to SW_AffectGround[SW_Loop]) and (SW_AffectGround[SW_Loop] Equal to True)










((TempUnit is A structure) Equal to SW_AffectStructure[SW_Loop]) and (SW_AffectStructure[SW_Loop] Equal to True)







Then - Actions








Unit - Cause SW_Caster[SW_Loop] to damage TempUnit, dealing SW_DamageX[SW_Loop] damage of attack type SW_AttackType[SW_Loop] and damage type SW_DamageType[SW_Loop]








If (SW_ExtraEffectTargetCheck[SW_Loop] Equal to True) then do (Trigger - Run SW_ExtraEffectTarget[SW_Loop] (checking conditions)) else do (Do nothing)








If (SW_OneInstance[SW_Loop] Equal to True) then do (Unit Group - Add TempUnit to SW_GroupDone[SW_Loop]) else do (Do nothing)







Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








(TempUnit belongs to an ally of (Owner of SW_Caster[SW_Loop])) Equal to SW_AffectAlly[SW_Loop]








SW_AffectAlly[SW_Loop] Equal to True








(TempUnit is in SW_GroupDone[SW_Loop]) Equal to False








Or - Any (Conditions) are true









Conditions










((TempUnit is A flying unit) Equal to SW_AffectAir[SW_Loop]) and (SW_AffectAir[SW_Loop] Equal to True)










((TempUnit is A ground unit) Equal to SW_AffectGround[SW_Loop]) and (SW_AffectGround[SW_Loop] Equal to True)










((TempUnit is A structure) Equal to SW_AffectStructure[SW_Loop]) and (SW_AffectStructure[SW_Loop] Equal to True)







Then - Actions








If (SW_ExtraEffectTargetCheck[SW_Loop] Equal to True) then do (Trigger - Run SW_ExtraEffectTarget[SW_Loop] (checking conditions)) else do (Do nothing)








If (SW_OneInstance[SW_Loop] Equal to True) then do (Unit Group - Add TempUnit to SW_GroupDone[SW_Loop]) else do (Do nothing)







Else - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






SW_DistanceX[SW_Loop] Less than or equal to 0.00





Then - Actions






Special Effect - Create a special effect attached to the origin of SW_Dummy[SW_Loop] using SW_WaveEffectEnd[SW_Loop]






Special Effect - Destroy (Last created special effect)






Special Effect - Destroy SW_Wave[SW_Loop]






Custom script: call DestroyGroup( udg_SW_GroupDone[udg_SW_Loop] )






Set SW_GroupDone[SW_Loop] = SW_GroupDone[SW_Max]






Set SW_Caster[SW_Loop] = SW_Caster[SW_Max]






Set SW_Caster[SW_Max] = No unit






Unit - Kill SW_Dummy[SW_Loop]






Set SW_Dummy[SW_Loop] = SW_Dummy[SW_Max]






Set SW_Dummy[SW_Max] = No unit






Set SW_Wave[SW_Loop] = SW_Wave[SW_Max]






Set SW_WaveEffectEnd[SW_Loop] = SW_WaveEffectEnd[SW_Max]






Set SW_WaveEffectLoop[SW_Loop] = SW_WaveEffectLoop[SW_Max]






Set SW_LoopingSfx[SW_Loop] = SW_LoopingSfx[SW_Max]






Set SW_ExtraEffectCheck[SW_Loop] = SW_ExtraEffectCheck[SW_Max]






Set SW_ExtraEffect[SW_Loop] = SW_ExtraEffect[SW_Max]






Set SW_ExtraEffectTargetCheck[SW_Loop] = SW_ExtraEffectTargetCheck[SW_Max]






Set SW_ExtraEffectTarget[SW_Loop] = SW_ExtraEffectTarget[SW_Max]






Set SW_AffectAlly[SW_Loop] = SW_AffectAlly[SW_Max]






Set SW_AffectEnemy[SW_Loop] = SW_AffectEnemy[SW_Max]






Set SW_AffectAir[SW_Loop] = SW_AffectAir[SW_Max]






Set SW_AffectStructure[SW_Loop] = SW_AffectStructure[SW_Max]






Set SW_AffectGround[SW_Loop] = SW_AffectGround[SW_Max]






Set SW_OneInstance[SW_Loop] = SW_OneInstance[SW_Max]






Set SW_AttackType[SW_Loop] = SW_AttackType[SW_Max]






Set SW_DamageType[SW_Loop] = SW_DamageType[SW_Max]






Set SW_DamageX[SW_Loop] = SW_DamageX[SW_Max]






Set SW_AreaCurrent[SW_Loop] = SW_AreaCurrent[SW_Max]






Set SW_AreaGrowth[SW_Loop] = SW_AreaGrowth[SW_Max]






Set SW_SpeedX[SW_Loop] = SW_SpeedX[SW_Max]






Set SW_DistanceX[SW_Loop] = SW_DistanceX[SW_Max]






Set SW_Lvl[SW_Loop] = SW_Lvl[SW_Max]






Set SW_Max = (SW_Max - 1)






Set SW_Loop = (SW_Loop - 1)





Else - Actions




Custom script: call RemoveLocation(udg_SW_NextPoint[0])




Custom script: call RemoveLocation(udg_SW_NextPoint[1])




Custom script: call DestroyGroup( udg_SW_Group )




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






SW_Max Equal to 0





Then - Actions






Trigger - Turn off (This trigger)





Else - Actions