Hello, so I've been working on a leech seed ability with the GUI, the idea is that all units hit will split the damage and heal the caster over time. Unfortunately, unless I'm missing something, it seems that in the separate timer/periodic trigger it only selects one unit from the targets unit group and deals the damage.
Everything else works properly and I've tested to ensure all units are in the unit group. However the damage and floating text only affect one unit. Any help would be greatly appreciated!
Everything else works properly and I've tested to ensure all units are in the unit group. However the damage and floating text only affect one unit. Any help would be greatly appreciated!
-
LeechSeedCast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Leech Seed
-
-
Actions
-
Set LeechSeed_Caster[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
-
Unit Group - Pick every unit in (Units within 175.00 of (Target point of ability being cast) matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and do (Actions)
-
Loop - Actions
-
Unit Group - Add (Picked unit) to LeechSeed_Targets[(Player number of (Owner of (Triggering unit)))]
-
Game - Display to (All players) the text: (Name of (Picked unit))
-
-
-
Set LeechSeed_Damage[(Player number of (Owner of (Triggering unit)))] = (((100.00 + (50.00 x (Real((Level of Leech Seed for (Triggering unit)))))) + ((Real((Intelligence of (Triggering unit) (Include bonuses)))) x 4.00)) / (16.00 x (Real((Number of units in LeechSeed_Targets[(Player number of (Owner of (Triggering unit)))])))))
-
Player Group - Add (Owner of (Triggering unit)) to LeechSeedPlayers
-
Unit Group - Pick every unit in LeechSeed_Targets[(Player number of (Owner of (Triggering unit)))] and do (Actions)
-
Loop - Actions
-
Unit - Create 1 Dummy for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
-
Unit - Add LeechSeedEffect to (Last created unit)
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Picked unit)
-
-
-
Trigger - Turn on LeechSeedTimer <gen>
-
-
-
LeechSeedTimer
-
Events
-
Time - Every 0.10 seconds of game time
-
-
Conditions
-
Actions
-
Player Group - Pick every player in LeechSeedPlayers and do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in LeechSeed_Targets[(Player number of (Picked player))] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is dead) Equal to True
-
-
Then - Actions
-
Unit Group - Remove (Picked unit) from LeechSeed_Targets[(Player number of (Picked player))]
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in LeechSeed_Targets[(Player number of (Picked player))]) Equal to 0
-
-
Then - Actions
-
Player Group - Remove (Picked player) from LeechSeedPlayers
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LeechSeed_Timer[(Player number of (Picked player))] Greater than or equal to 1.00
-
-
Then - Actions
-
Set LeechSeed_Timer[(Player number of (Picked player))] = 0.00
-
Set LeechSeed16Timer[(Player number of (Picked player))] = (LeechSeed16Timer[(Player number of (Picked player))] + 1)
-
Set LeechSeed_Heal[(Player number of (Picked player))] = (LeechSeed_Damage[(Player number of (Picked player))] x (Real((Number of units in LeechSeed_Targets[(Player number of (Picked player))]))))
-
Unit - Cause LeechSeed_Caster[(Player number of (Picked player))] to damage (Picked unit), dealing LeechSeed_Damage[(Player number of (Picked player))] damage of attack type Spells and damage type Normal
-
Unit - Set life of LeechSeed_Caster[(Player number of (Picked player))] to (LeechSeed_Heal[(Player number of (Picked player))] + (Life of LeechSeed_Caster[(Player number of (Picked player))]))
-
Floating Text - Create floating text that reads ((String((Integer(LeechSeed_Damage[(Player number of (Picked player))])))) + !) above (Picked unit) with Z offset 5.00, using font size 7.00, color (50.00%, 100.00%, 50.00%), and 0.00% transparency
-
Floating Text - Show (Last created floating text) for (All players)
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 0.50 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
-
Floating Text - Create floating text that reads ((String((Integer(LeechSeed_Heal[(Player number of (Picked player))])))) + !) above LeechSeed_Caster[(Player number of (Picked player))] with Z offset 5.00, using font size 7.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency
-
Floating Text - Show (Last created floating text) for (All players)
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 0.50 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 0.20 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
LeechSeed16Timer[(Player number of (Picked player))] Equal to 16
-
-
Then - Actions
-
Set LeechSeed16Timer[(Player number of (Picked player))] = 0
-
Unit Group - Remove all units from LeechSeed_Targets[(Player number of (Picked player))]
-
Player Group - Remove (Picked player) from LeechSeedPlayers
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of players in LeechSeedPlayers) Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
Set LeechSeed_Timer[(Player number of (Picked player))] = (LeechSeed_Timer[(Player number of (Picked player))] + 0.10)
-
-
-
-
-
-
-
-