[trigger=""]
Loop
Events
Time - Intervals expires
Conditions
Actions
-------- CAUTION --------
-------- THIS SECTION IS INCREDABLY CONFUSING --------
-------- PROCEED WITH CARE --------
-------- Set to your dummy missile --------
Set Temp_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Projectile))
-------- Dont change what unit group this picks --------
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
-------- * --------
Set Gravity_unit = (Picked unit)
-------- It's best not to change this --------
-------- It controlls distance traveled by your missile --------
Set Sepharic_Star_Speed = ((Integer((Load 0 of (Key (Picked unit)) from Sepharic_Star_Hashtable))) / 2)
-------- * --------
Hashtable - Save (Real(Sepharic_Star_Speed)) as 0 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- * --------
Set Temp_Point_2 = (Temp_Point offset by (Load 0 of (Key (Picked unit)) from Sepharic_Star_Hashtable) towards (Facing of (Picked unit)) degrees)
-------- * --------
Unit - Move (Picked unit) instantly to Temp_Point_2
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 0 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Less than or equal to 2.00
Then - Actions
-------- Set the 155 number to your spells distance per level --------
Set Temp_Group_2 = (Units within (155.00 x (Real((Level of Sepharic Star (Dummy) for Gravity_unit)))) of Temp_Point matching ((((Owner of (Matching unit)) is an ally of (Owner of Gravity_unit)) Equal to False) and ((Owner of (Matching unit)) Not equal to (Owner of Gravity_unit)
-------- * --------
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
Loop - Actions
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- * --------
Hashtable - Save Handle OfTemp_Point as 9 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
Custom script: call DestroyGroup (udg_Temp_Group_2)
Else - Actions
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- * --------
Set Gravity_Unit_ID = (Picked unit)
-------- * --------
Hashtable - Save (Current flying height of Gravity_unit) as 10 of (Key Gravity_Unit_ID) in Sepharic_Star_Hashtable
-------- * --------
Hashtable - Save Handle OfTemp_Point as 9 of (Key Gravity_Unit_ID) in Sepharic_Star_Hashtable
-------- Set this to your spells Aoe --------
Set Temp_Group_2 = (Units within (155.00 x (Real((Level of Sepharic Star (Dummy) for Gravity_unit)))) of Temp_Point matching ((((Owner of (Matching unit)) is an ally of (Owner of Gravity_unit)) Equal to False) and ((Owner of (Matching unit)) Not equal to (Owner of Gravity_unit)
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point_2)
-------- Dont change what unit group this picks --------
Unit Group - Pick every unit in Temp_Group_2 and do (Actions)
Loop - Actions
-------- * --------
Unit - Turn collision for (Picked unit) Off
-------- * --------
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Hashtable - Save (Default flying height of (Picked unit)) as 11 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Hashtable - Save (Current flying height of Gravity_unit) as 10 of (Key Gravity_Unit_ID) in Sepharic_Star_Hashtable
-------- Damage formula --------
-------- Set the '20' to your landing damage of the units (will affect air units as well) --------
Hashtable - Save (20 x (Level of Sepharic Star (Dummy) for Gravity_unit)) as 50 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Unit - Add Crow Form to (Picked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 25 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Equal to 0
Then - Actions
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Spells\Orc\Voodoo\VoodooAuraTarget.mdl
Hashtable - Save Handle Of(Last created special effect) as 20 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Hashtable - Save 1 as 25 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Greater than (Load 10 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable)
(Gravity_unit is alive) Equal to True
Then - Actions
Animation - Change (Picked unit) flying height to ((Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) - (Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable)))) at 0.00
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Less than (Load 10 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable)
(Gravity_unit is alive) Equal to True
Then - Actions
Animation - Change (Picked unit) flying height to ((Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) + (Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable)))) at 0.00
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Else - Actions
-------- * --------
Unit - Remove Crow Form from (Picked unit)
-------- * --------
Set Temp_Point = (Position of Gravity_unit)
-------- * --------
Set Temp_Point_2 = (Position of (Picked unit))
-------- * --------
Unit - Move (Picked unit) instantly to Temp_Point_2, facing (Angle from Temp_Point_2 to Temp_Point) degrees
-------- Damage calculator set the '-100' to your damage (make sure you start it with a - or it will --------
-------- Be a healing spell --------
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (100.00 x (Real((Level of Sepharic Star (Dummy) for (Triggering unit))))))
-------- Gravity per level calculator --------
-------- Keep the number low --------
Hashtable - Save (2 x (Level of Sepharic Star (Dummy) for Gravity_unit)) as 7 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point_2)
-------- * --------
Custom script: call DestroyGroup (udg_Temp_Group_2)
-------- * --------
Custom script: call DestroyGroup (udg_Temp_Group)
-------- * --------
Set Temp_Group = (Units in (Playable map area) matching (((Matching unit) is in Returning_to_normal_fly_height) Equal to True))
-------- Dont change what unit group this picks --------
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
-------- * --------
Unit - Add Crow Form to (Picked unit)
-------- * --------
Unit Group - Remove (Picked unit) from Returning_to_normal_fly_height
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Less than (Load 11 of (Key (Picked unit)) from Sepharic_Star_Hashtable)
Then - Actions
-------- Rise calculation --------
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable))) x 1.50)) at 0.00
-------- * --------
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Unit Group - Add (Picked unit) to Returning_to_normal_fly_height
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Greater than (Load 11 of (Key (Picked unit)) from Sepharic_Star_Hashtable)
(Load 7 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Equal to 0
Then - Actions
-------- * --------
Hashtable - Save 0.00 as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable))) x -1.50)) at 0.00
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- Change to your landing sfx --------
Special Effect - Create a special effect at Temp_Point using Objects\Spawnmodels\Human\FragmentationShards\FragBoomSpawn.mdl
-------- * --------
Special Effect - Destroy (Last created special effect)
-------- * --------
Special Effect - Destroy (Load 20 of (Key (Picked unit)) in Sepharic_Star_Hashtable)
-------- * --------
Unit - Cause (Load 100 of (Key (Picked unit)) in (Last created hashtable)) to damage (Picked unit), dealing (Real((Load 50 of (Key (Picked unit)) from Sepharic_Star_Hashtable))) damage of attack type Spells and damage type Normal
-------- * --------
Hashtable - Save 0 as 25 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Unit Group - Remove (Picked unit) from Returning_to_normal_fly_height
-------- * --------
Unit - Turn collision for (Picked unit) On
-------- * --------
Hashtable - Save -1 as 7 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Set Currant_intstances = (Currant_intstances - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Currant_intstances Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Greater than (Load 11 of (Key (Picked unit)) from Sepharic_Star_Hashtable)
Then - Actions
-------- Fall caluculation --------
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable))) x -1.50)) at 0.00
-------- * --------
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Unit Group - Add (Picked unit) to Returning_to_normal_fly_height
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 10 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Less than (Load 11 of (Key (Picked unit)) from Sepharic_Star_Hashtable)
(Load 7 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Equal to 0
Then - Actions
-------- * --------
Hashtable - Save 0.00 as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable))) x -1.50)) at 0.00
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- Change to landing Sfx --------
Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Other\Charm\CharmTarget.mdl
-------- * --------
Special Effect - Destroy (Last created special effect)
-------- * --------
Special Effect - Destroy (Load 20 of (Key (Picked unit)) in Sepharic_Star_Hashtable)
-------- * --------
Hashtable - Save 0 as 25 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Unit Group - Remove (Picked unit) from Returning_to_normal_fly_height
-------- * --------
Unit - Turn collision for (Picked unit) On
-------- * --------
Unit - Cause (Picked unit) to damage (Picked unit), dealing (Real((Load 50 of (Key (Picked unit)) from Sepharic_Star_Hashtable))) damage of attack type Spells and damage type Normal
-------- * --------
Hashtable - Save -1 as 7 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Set Currant_intstances = (Currant_intstances - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Currant_intstances Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
-------- * --------
Unit - Remove Crow Form from (Picked unit)
-------- * --------
Custom script: call DestroyGroup (udg_Temp_Group)
-------- * --------
Set Temp_Group = (Units in (Playable map area) matching ((Load 7 of (Key (Matching unit)) from Sepharic_Star_Hashtable) Greater than or equal to 1))
-------- Dont change what unit group this picks --------
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
-------- * --------
Set Temp_Point = (Position of (Picked unit))
-------- Knockback speed --------
Set Temp_Point_2 = (Temp_Point offset by 10.00 towards (Facing of (Picked unit)) degrees)
-------- * --------
Unit - Move (Picked unit) instantly to Temp_Point_2
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is A flying unit) Equal to True
(Load 7 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Greater than 10
Then - Actions
-------- * --------
Unit - Add Crow Form to (Picked unit)
-------- Flying unit knockback upwards calculation --------
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + ((Real((Load 2 of (Key Gravity_Unit_ID) from Sepharic_Star_Hashtable))) x 2.50)) at 0.00
-------- * --------
Hashtable - Save (Current flying height of (Picked unit)) as 10 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Unit - Remove Crow Form from (Picked unit)
Else - Actions
-------- * --------
Hashtable - Save ((Load 7 of (Key (Picked unit)) from Sepharic_Star_Hashtable) - 1) as 7 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point)
-------- * --------
Custom script: call RemoveLocation (udg_Temp_Point_2)
-------- * --------
Custom script: call DestroyGroup (udg_Temp_Group)
-------- * --------
Set Temp_Group = (Units in (Playable map area) matching ((Load 25 of (Key (Matching unit)) from Sepharic_Star_Hashtable) Equal to 1))
-------- Dont change what unit group this picks --------
Unit Group - Pick every unit in Temp_Group and do (Actions)
Loop - Actions
-------- Damage dealt (increases every second of spell duration) --------
Hashtable - Save ((Load 50 of (Key (Picked unit)) from Sepharic_Star_Hashtable) + 1) as 50 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 7 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Greater than 0
Then - Actions
Hashtable - Save 0 as 55 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Else - Actions
-------- This part cancels damage to units that evaded the initial gravity effect --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Load 55 of (Key (Picked unit)) from Sepharic_Star_Hashtable) Equal to 5
Then - Actions
-------- * --------
Hashtable - Save 0 as 50 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Hashtable - Save 0 as 55 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Special Effect - Destroy (Load 20 of (Key (Picked unit)) in Sepharic_Star_Hashtable)
-------- * --------
Hashtable - Save 0 as 25 of (Key (Picked unit)) in Sepharic_Star_Hashtable
Else - Actions
-------- * --------
Hashtable - Save ((Load 55 of (Key (Picked unit)) from Sepharic_Star_Hashtable) + 1) as 55 of (Key (Picked unit)) in Sepharic_Star_Hashtable
-------- * --------
Custom script: call DestroyGroup (udg_Temp_Group)
[/trigger]
Same with the other trigger, Wrong orders my friend! Fix them, If a variable that is using a variable gets removed before the other variable is removed, it leaks. Ok, I bet you didn't understand, let me explain.
[trigger=""]
set TempPointA = GG_LOCATION
set TempPointB = ((TempPointA), 60, 50)
call RemoveLocation(udg_TempPointA)
call RemoveLocation(udg_TempPointB)
[/trigger]
Result - Leak
[trigger=""]
set TempPointA = GG_LOCATION
set TempPointB = ((TempPointA), 60, 50)
call RemoveLocation(udg_TempPointB)
call RemoveLocation(udg_TempPointA)
[/trigger]
Result - Fixed Leak
|