- Joined
- Jun 10, 2007
- Messages
- 554
Hi, so I have this spell that I want to create a set of 7 dummy units in an area which damage and cast spells on enemies inside of them every 0.50 seconds so I decided to use a Hashtable and it's not working and I can't figure out why.
When I cast it it creates the 7 dummy units but nothing else happens; they don't do damage or create dummies to cast spells on units in the radius.
Can anybody find out what's wrong? +rep would be involved and thanks in advance!
-
Grove of the Wicked Cast
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Grove of the Wicked (Despoiler)
-
-

Actions
-


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



If - Conditions
-




(Number of units in GroveoftheWickedGroup) Equal to 0
-
-



Then - Actions
-




Trigger - Turn on Grove of the Wicked FX <gen>
-
-



Else - Actions
-
-


Set Location = (Target point of ability being cast)
-


Unit - Create 1 Grove of the Wicked (Despoiler) for (Owner of (Triggering unit)) at Location facing (Random real number between 1.00 and 360.00) degrees
-


Unit Group - Add (Last created unit) to GroveoftheWickedGroup
-


Hashtable - Save Handle OfLocation as 0 of (Key location) in GroveoftheWicked
-


Set Integer = (Level of Grove of the Wicked (Despoiler) for (Triggering unit))
-


Hashtable - Save (Level of Grove of the Wicked (Despoiler) for (Triggering unit)) as 1 of (Key level) in GroveoftheWicked
-


Hashtable - Save 10.00 as 2 of (Key duration) in GroveoftheWicked
-


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



Loop - Actions
-




Set Location2 = (Location offset by 100.00 towards (60.00 x (Real((Integer A)))) degrees)
-




Unit - Create 1 Grove of the Wicked (Despoiler) for (Owner of (Triggering unit)) at Location2 facing (Random real number between 1.00 and 360.00) degrees
-




Custom script: call RemoveLocation (udg_Location2)
-
-
-


Set Integer = 0
-


Custom script: call RemoveLocation (udg_Location)
-
-
-
Grove of the Wicked FX
-

Events
-


Time - Every 0.50 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




Set Location = (Load 0 of (Key location) in GroveoftheWicked)
-




Set Integer = (Load 1 of (Key level) from GroveoftheWicked)
-




Set GroveoftheWickedTime = (Load 2 of (Key duration) from GroveoftheWicked)
-




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





If - Conditions
-






GroveoftheWickedTime Greater than 0.00
-
-





Then - Actions
-






Set Group = (Units within 250.00 of Location matching (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))
-






For each (Integer A) from 1 to (Number of units in Group), do (Actions)
-







Loop - Actions
-








Set Unit = (Random unit from Group)
-








Unit - Cause (Picked unit) to damage Unit, dealing (6.00 x (Real(Integer))) damage of attack type Spells and damage type Normal
-








Unit - Create 1 Dummy for (Owner of (Picked unit)) at Location facing Default building facing degrees
-








Unit - Add Wicked Vines to (Last created unit)
-








Unit - Set level of Wicked Vines for (Last created unit) to Integer
-








Unit - Order (Last created unit) to Neutral Fire Lord - Soul Burn Unit
-








Unit Group - Remove Unit from Group
-








Hashtable - Save (GroveoftheWickedTime - 0.50) as 2 of (Key (Picked unit)) in GroveoftheWicked
-
-
-
-





Else - Actions
-






Hashtable - Clear all child hashtables of child (Key (Picked unit)) in GroveoftheWicked
-






Unit Group - Remove (Picked unit) from GroveoftheWickedGroup
-






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







If - Conditions
-








(Number of units in GroveoftheWickedGroup) Equal to 0
-
-







Then - Actions
-








Trigger - Turn off (This trigger)
-
-







Else - Actions
-
-
-
-
-
-
-
When I cast it it creates the 7 dummy units but nothing else happens; they don't do damage or create dummies to cast spells on units in the radius.
Can anybody find out what's wrong? +rep would be involved and thanks in advance!











