I need help with this because I haven't been able to find the cause of the bug. This trigger is based on a Fissure spell, but I modified it slightly by temporarily moving the affected units while I place the 'fissure shards' so that they always remain in a straight line. The trigger works fine initially, but only the first time. In subsequent invocations, the units are moved to the center of the map and do not return to their original position. It works fine without bugs if I recreate the hashtable entirely at the end of the trigger. So, I need to clean it up, I suppose, but using "Hashtable - Clear" doesnt resolve the problem. Although I don't quite understand why I would need to do this since the unique keys of the units should replace the previous values. I'm not quite sure what's happening.
If i add this at the end then it works as expected:
Any help would be appreciated.
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Fissure (Channel)
-
-
Actions
-
Set Fissure_Caster = (Triggering unit)
-
Set Fissure_Point = (Position of (Triggering unit))
-
Set Fissure_Point2[1] = (Target point of ability being cast)
-
Set Fissure_Angle = (Angle from Fissure_Point to Fissure_Point2[1])
-
Custom script: call RemoveLocation (udg_Fissure_Point2[1])
-
For each (Integer Fissure_Loop) from 1 to 10, do (Actions)
-
Loop - Actions
-
Set Fissure_Point2[Fissure_Loop] = (Fissure_Point offset by (80.00 x (Real(Fissure_Loop))) towards Fissure_Angle degrees)
-
Set Fissure_CheckAOEGroup = (Units within 200.00 of Fissure_Point2[Fissure_Loop] matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((((Matching unit) is in Fissure_Group) Equal to False) and ((Matching unit) Not equ
-
Unit Group - Add all units of Fissure_CheckAOEGroup to Fissure_Group
-
Unit Group - Pick every unit in Fissure_CheckAOEGroup and do (Actions)
-
Loop - Actions
-
Hashtable - Save (X of (Position of (Picked unit))) as (Key (Picked unit)) of 0 in Fissure_Hashtable
-
Hashtable - Save (Y of (Position of (Picked unit))) as (Key (Picked unit)) of 1 in Fissure_Hashtable
-
Unit - Move (Picked unit) instantly to (Center of (Playable map area))
-
-
-
-
-
For each (Integer Fissure_Loop) from 1 to 10, do (Actions)
-
Loop - Actions
-
Unit - Create 1 FissureShard (LEVEL 1) for (Owner of Fissure_Caster) at Fissure_Point2[Fissure_Loop] facing Default building facing degrees
-
Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
-
-
-
Unit - Create 1 DummyUnit for (Triggering player) at Fissure_Point facing 0.00 degrees
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Add Fissure (Stormbolt) to (Last created unit)
-
Unit - Set level of Fissure (Stormbolt) for (Last created unit) to (Level of (Ability being cast) for (Triggering unit))
-
Unit Group - Pick every unit in Fissure_Group and do (Actions)
-
Loop - Actions
-
Set X = (Load (Key (Picked unit)) of 0 from Fissure_Hashtable)
-
Set Y = (Load (Key (Picked unit)) of 1 from Fissure_Hashtable)
-
Set TempPoint1 = (Point(X, Y))
-
Unit - Move (Picked unit) instantly to TempPoint1
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
-
((Picked unit) is A ground unit) Equal to True
-
((Picked unit) is A structure) Equal to False
-
((Picked unit) belongs to an enemy of (Triggering player)) Equal to True
-
((Picked unit) is alive) Equal to True
-
-
-
-
Then - Actions
-
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in Fissure_Hashtable
-
-
Else - Actions
-
-
-
-
Unit Group - Remove all units from Fissure_CheckAOEGroup
-
Unit Group - Remove all units from Fissure_Group
-
Hashtable - Clear Fissure_Hashtable
-
If i add this at the end then it works as expected:
-
Hashtable - Create a hashtable
-
Set Fissure_Hashtable = (Last created hashtable)
Any help would be appreciated.