- Joined
- Oct 9, 2015
- Messages
- 721
I have an unit problem and hope somebody can help me with it! I searched a lot in the hive before, that's why I'm creating this thread.
My problem is I have a trigger that fires when a unit dies, then I pick some units arround it and make actions with them, THEN I create another unit like the one who died to fire the trigger and add 0.5 expiration timer to it, this is making the trigger pick the same units twice, I tried add said units to a group after they are picked and check with a boolean to only pick the units if they aren't in that group, it works fine, but I can't seem to be able to remove them from the group after.
My problem is I have a trigger that fires when a unit dies, then I pick some units arround it and make actions with them, THEN I create another unit like the one who died to fire the trigger and add 0.5 expiration timer to it, this is making the trigger pick the same units twice, I tried add said units to a group after they are picked and check with a boolean to only pick the units if they aren't in that group, it works fine, but I can't seem to be able to remove them from the group after.
-
Trigger
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Triggering unit)) Equal to Dummy
-
-
Then - Actions
-
Set Loc1 = (Position of (Triggering unit))
-
Unit Group - Pick every unit in (Units within 512.00 of Loc1) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Picked unit) Not equal to (Triggering unit)
-
((Picked unit) is in UnitGroup) Equal to False
-
-
Then - Actions
-
Unit - Cause (Triggering unit) to damage (Picked unit), dealing 10.00 damage of attack type Spells and damage type Normal
-
Unit Group - Add (Picked unit) to UnitGroup
-
-
Else - Actions
-
Unit Group - Remove (Picked unit) from UnitGroup
-
-
-
-
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at Loc1 facing (Facing of (Triggering unit)) degrees
-
Unit - Add a 0.05 second Generic expiration timer to (Last created unit)
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_Loc1)
-
-