- Joined
- Mar 17, 2012
- Messages
- 582
Hi everyone! I have a little problem.
I got a spell that acts like a Shockwave, but damage is triggered. But for some reason it damages units several time despite the fact that I add units in "Damaged_Group" and check if they are in that group not to damage them again...
Help me please
I got a spell that acts like a Shockwave, but damage is triggered. But for some reason it damages units several time despite the fact that I add units in "Damaged_Group" and check if they are in that group not to damage them again...

-
Retribution
-

Events
-


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

Conditions
-


(Ability being cast) Equal to Retribution of Overlord
-
-

Actions
-


Set Retribution_Counts = (Retribution_Counts + 1)
-


Set Retribution_Caster[Retribution_Counts] = (Triggering unit)
-


Set Retribution_Caster_Point = (Position of Retribution_Caster[Retribution_Counts])
-


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


Set Retribution_Angle = (Angle from Retribution_Caster_Point to Retribution_Target_Point)
-


Unit - Create 1 Retribution Dummy for (Owner of Retribution_Caster[Retribution_Counts]) at Retribution_Caster_Point facing Retribution_Angle degrees
-


Unit - Set the custom value of (Last created unit) to Retribution_Counts
-


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


Set Retribution_Distance[Retribution_Counts] = 1000.00
-


Set Retribution_DistanceTravel[Retribution_Counts] = 0.00
-


Trigger - Turn on Retribution Move <gen>
-


Custom script: call RemoveLocation (udg_Retribution_Caster_Point)
-


Custom script: call RemoveLocation (udg_Retribution_Target_Point)
-
-
-
Retribution Move
-

Events
-


Time - Every 0.02 seconds of game time
-
-

Conditions
-

Actions
-


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



Loop - Actions
-




Set Retribution_CustomValue = (Custom value of (Picked unit))
-




Set Retribution_DummyLoc = (Position of (Picked unit))
-




Set Retribution_Movement = (Retribution_DummyLoc offset by 30.00 towards (Facing of (Picked unit)) degrees)
-




Unit - Move (Picked unit) instantly to Retribution_Movement
-




Set Retribution_DistanceTravel[Retribution_CustomValue] = (Retribution_DistanceTravel[Retribution_CustomValue] + 30.00)
-




Set Retribution_UnitGroup = (Units within 200.00 of Retribution_Movement matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of (Owner of Retribution_Caster[Retribution_CustomValue])) E
-




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





Loop - Actions
-






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







If - Conditions
-








((Picked unit) is in Retribution_Damaged_Units) Equal to True
-
-







Then - Actions
-








Do nothing
-
-







Else - Actions
-








Unit - Cause Retribution_Caster[Retribution_CustomValue] to damage (Picked unit), dealing ((((Real((Intelligence of Retribution_Caster[Retribution_CustomValue] (Include bonuses)))) x 1.75) + (((Real((Level of Retribution of Overlord for Retribution_Caster[Retribution_CustomValue]))) x 120.00) + 250.00)) + (((Real((Level of Elune's Arrow for Elun damage of attack type Spells and damage type Fire
-








Unit Group - Add (Picked unit) to Retribution_Damaged_Units
-
-
-
-
-




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





If - Conditions
-






Retribution_DistanceTravel[Retribution_CustomValue] Greater than or equal to Retribution_Distance[Retribution_CustomValue]
-
-





Then - Actions
-






Unit - Kill (Picked unit)
-






Unit Group - Remove (Picked unit) from Retribution_StartGroup
-
-





Else - Actions
-
-




Custom script: call RemoveLocation (udg_Retribution_DummyLoc)
-




Custom script: call RemoveLocation (udg_Retribution_Movement)
-




Custom script: call DestroyGroup (udg_Retribution_UnitGroup)
-
-
-


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



If - Conditions
-




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



Then - Actions
-




Custom script: call DestroyGroup (udg_Retribution_Damaged_Units)
-




Trigger - Turn off (This trigger)
-
-



Else - Actions
-
-
-
Last edited:

















