Moderator
M
Moderator
15:57, 20th Sep 2014
TriggerHappy:
Rejected on request.
TriggerHappy:
Rejected on request.
Charge VARIABLES

Events


Map initialization

Conditions

Actions


Set Charge_Damage[1] = 100.00


Set Charge_Damage[2] = 150.00


Set Charge_Damage[3] = 200.00


Set Charge_Damage[4] = 300.00


Set Charge_Damage[5] = 350.00


Set Charge_DistanceMoved = 30.00


Set Charge_Distance_Status_Change[1] = 0.00


Set Charge_Distance_Status_Change[2] = 300.00


Set Charge_Distance_Status_Change[3] = 600.00


Set Charge_AoE_Damage = 350.00


Set Charge_AttachmentPoint = origin


Set Charge_SpecialEffect1 = Abilities\Spells\Orc\Shockwave\ShockwaveMissile.mdl


Set Charge_SpecialEffect2 = ShadowWave.mdx


Trigger - Add to Charge LOOP <gen> the event (Time - Every 0.05 seconds of game time)
Charge CAST

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Charge

Actions


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



If - Conditions




Charge_MUI Equal to False



Then - Actions




Trigger - Turn on Charge LOOP <gen>



Else - Actions


Set Charge_MUI = True


Set Charge_MUI_2 = (Charge_MUI_2 + 1)


Set Charge_Unit[Charge_MUI_2] = (Casting unit)


Set Charge_Level[Charge_MUI_2] = (Level of Charge for Charge_Unit[Charge_MUI_2])


Set Charge_CastingPoint[Charge_MUI_2] = (Target point of ability being cast)


Set Charge_Unit_Point[Charge_MUI_2] = (Position of Charge_Unit[Charge_MUI_2])


Set Charge_Angle[Charge_MUI_2] = (Angle from Charge_Unit_Point[Charge_MUI_2] to Charge_CastingPoint[Charge_MUI_2])


Set Charge_Distance[Charge_MUI_2] = (Distance between Charge_Unit_Point[Charge_MUI_2] and Charge_CastingPoint[Charge_MUI_2])


Set Charge_Status[Charge_MUI_2] = -1


Set Charge_DistanceTraveled[Charge_MUI_2] = 0.00


For each (Integer A) from 1 to 3, do (Actions)



Loop - Actions




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





If - Conditions






Charge_Distance[Charge_MUI_2] Greater than or equal to Charge_Distance_Status_Change[(Integer A)]





Then - Actions






Set Charge_Status[Charge_MUI_2] = (Charge_Status[Charge_MUI_2] + 1)





Else - Actions


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



If - Conditions




Charge_Status[Charge_MUI_2] Equal to 0



Then - Actions



Else - Actions




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





If - Conditions






Charge_Status[Charge_MUI_2] Equal to 1





Then - Actions






Special Effect - Create a special effect attached to the Charge_AttachmentPoint of Charge_Unit[Charge_MUI_2] using Charge_SpecialEffect1






Set Charge_Effect[Charge_MUI_2] = (Last created special effect)





Else - Actions






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







If - Conditions








Charge_Status[Charge_MUI_2] Equal to 2







Then - Actions








Special Effect - Create a special effect attached to the Charge_AttachmentPoint of Charge_Unit[Charge_MUI_2] using Charge_SpecialEffect2








Set Charge_Effect[Charge_MUI_2] = (Last created special effect)







Else - Actions


Unit Group - Add Charge_Unit[Charge_MUI_2] to Charge_Group


Unit - Pause Charge_Unit[Charge_MUI_2]


Unit - Make Charge_Unit[Charge_MUI_2] Invulnerable
Charge LOOP

Events

Conditions

Actions


For each (Integer A) from 1 to Charge_MUI_2, do (Actions)



Loop - Actions




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





If - Conditions






Charge_DistanceTraveled[(Integer A)] Less than Charge_Distance[(Integer A)]





Then - Actions






Unit - Turn collision for Charge_Unit[(Integer A)] Off






Set Charge_MovePoint[(Integer A)] = ((Position of Charge_Unit[(Integer A)]) offset by Charge_DistanceMoved towards Charge_Angle[(Integer A)] degrees)






Set Charge_DistanceTraveled[(Integer A)] = (Charge_DistanceTraveled[(Integer A)] + 30.00)






Unit - Move Charge_Unit[(Integer A)] instantly to Charge_MovePoint[(Integer A)], facing Charge_Angle[(Integer A)] degrees






Custom script: call RemoveLocation (udg_Charge_MovePoint[GetForLoopIndexA()])





Else - Actions






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







If - Conditions








Charge_Status[(Integer A)] Equal to 0







Then - Actions








Set Charge_Unit_Group[(Integer A)] = (Units within Charge_AoE_Damage of Charge_CastingPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Charge_Unit[(Integer A)])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechani








Unit Group - Pick every unit in Charge_Unit_Group[(Integer A)] and do (Actions)









Loop - Actions










Unit - Cause Charge_Unit[(Integer A)] to damage (Picked unit), dealing Charge_Damage[Charge_Level[(Integer A)]] damage of attack type Spells and damage type Normal








Unit - Unpause Charge_Unit[(Integer A)]








Unit - Make Charge_Unit[(Integer A)] Vulnerable








Unit Group - Remove Charge_Unit[(Integer A)] from Charge_Group








Unit - Turn collision for Charge_Unit[(Integer A)] On








Custom script: call RemoveLocation (udg_Charge_Unit_Point[GetForLoopIndexA()])








Custom script: call RemoveLocation (udg_Charge_CastingPoint[GetForLoopIndexA()])








Custom script: call DestroyGroup (udg_Charge_Unit_Group[GetForLoopIndexA()])








Custom script: call RemoveLocation (udg_Charge_MovePoint[GetForLoopIndexA()])







Else - Actions








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









If - Conditions










Charge_Status[(Integer A)] Equal to 1









Then - Actions










Set Charge_Unit_Group[(Integer A)] = (Units within Charge_AoE_Damage of Charge_CastingPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Charge_Unit[(Integer A)])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechani










Unit Group - Pick every unit in Charge_Unit_Group[(Integer A)] and do (Actions)











Loop - Actions












Unit - Cause Charge_Unit[(Integer A)] to damage (Picked unit), dealing Charge_Damage[Charge_Level[(Integer A)]] damage of attack type Spells and damage type Normal










Unit - Unpause Charge_Unit[(Integer A)]










Unit - Make Charge_Unit[(Integer A)] Vulnerable










Unit Group - Remove Charge_Unit[(Integer A)] from Charge_Group










Special Effect - Destroy Charge_Effect[(Integer A)]










Unit - Turn collision for Charge_Unit[(Integer A)] On










-------- ================= --------










Unit - Create 1 dummy for (Owner of Charge_Unit[(Integer A)]) at Charge_CastingPoint[(Integer A)] facing Default building facing degrees










Unit - Add a 1.00 second Generic expiration timer to (Last created unit)










Unit - Add Slam (CHARGE SLOW) to (Last created unit)










Unit - Set level of Slam (CHARGE SLOW) for (Last created unit) to Charge_Level[(Integer A)]










Unit - Order (Last created unit) to Neutral - Slam










Special Effect - Create a special effect at Charge_CastingPoint[(Integer A)] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl










Special Effect - Destroy (Last created special effect)










-------- ================= --------










Custom script: call RemoveLocation (udg_Charge_Unit_Point[GetForLoopIndexA()])










Custom script: call RemoveLocation (udg_Charge_CastingPoint[GetForLoopIndexA()])










Custom script: call DestroyGroup (udg_Charge_Unit_Group[GetForLoopIndexA()])










Custom script: call RemoveLocation (udg_Charge_MovePoint[GetForLoopIndexA()])









Else - Actions










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











If - Conditions












Charge_Status[(Integer A)] Equal to 2











Then - Actions












Set Charge_Unit_Group[(Integer A)] = (Units within Charge_AoE_Damage of Charge_CastingPoint[(Integer A)] matching ((((Matching unit) belongs to an enemy of (Owner of Charge_Unit[(Integer A)])) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Mechani












Unit Group - Pick every unit in Charge_Unit_Group[(Integer A)] and do (Actions)













Loop - Actions














Unit - Cause Charge_Unit[(Integer A)] to damage (Picked unit), dealing Charge_Damage[Charge_Level[(Integer A)]] damage of attack type Spells and damage type Normal












Unit - Unpause Charge_Unit[(Integer A)]












Unit - Make Charge_Unit[(Integer A)] Vulnerable












Unit Group - Remove Charge_Unit[(Integer A)] from Charge_Group












Special Effect - Destroy Charge_Effect[(Integer A)]












Unit - Turn collision for Charge_Unit[(Integer A)] On












-------- ================= --------












Unit - Create 1 dummy for (Owner of Charge_Unit[(Integer A)]) at Charge_CastingPoint[(Integer A)] facing Default building facing degrees












Unit - Add a 1.00 second Generic expiration timer to (Last created unit)












Unit - Add Slam (CHARGE SLOW) to (Last created unit)












Unit - Set level of Slam (CHARGE SLOW) for (Last created unit) to Charge_Level[(Integer A)]












Unit - Order (Last created unit) to Neutral - Slam












Special Effect - Create a special effect at Charge_CastingPoint[(Integer A)] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl












Special Effect - Destroy (Last created special effect)












-------- ================= --------












Unit - Create 1 dummy for (Owner of Charge_Unit[(Integer A)]) at Charge_CastingPoint[(Integer A)] facing Default building facing degrees












Unit - Add a 1.00 second Generic expiration timer to (Last created unit)












Unit - Add Charge (STUN) to (Last created unit)












Unit - Set level of Charge (STUN) for (Last created unit) to Charge_Level[(Integer A)]












Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp












Special Effect - Create a special effect at Charge_CastingPoint[(Integer A)] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl












Special Effect - Destroy (Last created special effect)












Custom script: call RemoveLocation (udg_Charge_Unit_Point[GetForLoopIndexA()])












Custom script: call RemoveLocation (udg_Charge_CastingPoint[GetForLoopIndexA()])












Custom script: call DestroyGroup (udg_Charge_Unit_Group[GetForLoopIndexA()])












Custom script: call RemoveLocation (udg_Charge_MovePoint[GetForLoopIndexA()])











Else - Actions




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





If - Conditions






(Number of units in Charge_Group) Equal to 0





Then - Actions






Trigger - Turn off (This trigger)






Set Charge_MUI = False






Set Charge_MUI_2 = 0





Else - Actions