- Joined
- Jul 25, 2009
- Messages
- 3,091
Occasionally, when my DDS detects damage from AoE and this function runs, and it appropriately kills squad members once a certain hp threshold is reached for the leader, the leader dies but isn't replaced. Any ideas on why?
-
Removing Units
-
Events
-
Game - DamageModifierEvent becomes Equal to 1.00
-
-
Conditions
-
(Point-value of (Unit-type of DamageEventTarget)) Greater than 0
-
GDamageBlockingActive[(Custom value of DamageEventTarget)] Equal to False
-
-
Actions
-
Set TempUnit = GLeader[(Custom value of DamageEventTarget)]
-
Set TempInteger = (Custom value of DamageEventTarget)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Percentage life of GLeader[TempInteger]) Less than or equal to (GPercentage[TempInteger] x (GCurrentSquadSize[TempInteger] - 1.00))
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DamageEventTarget Equal to GLeader[TempInteger]
-
-
Then - Actions
-
Set TempGroup2 = (Units in (Playable map area) matching ((TempInteger Equal to (Custom value of (Matching unit))) and ((((Matching unit) is dead) Equal to False) and (TempUnit Not equal to (Matching unit)))))
-
Set TempUnit2 = (Random unit from TempGroup2)
-
Unit - Set life of TempUnit2 to (Life of DamageEventTarget)
-
Unit - Cause DamageEventSource to damage DamageEventTarget, dealing 111111.00 damage of attack type Normal and damage type Normal
-
Unit - Replace TempUnit2 with a (Unit-type of GLeader[TempInteger]) using The old unit's life and mana
-
Set GLeader[TempInteger] = (Last replaced unit)
-
Unit - Set the custom value of GLeader[TempInteger] to TempInteger
-
Unit - Change color of GLeader[TempInteger] to (Color of (Owner of GLeader[TempInteger]))
-
Set GCurrentSquadSize[TempInteger] = (GCurrentSquadSize[TempInteger] - 1.00)
-
Unit - Add LeaderAttachment[(Player number of (Owner of (Last replaced unit)))] to (Last replaced unit)
-
-
Else - Actions
-
Unit - Cause DamageEventSource to damage DamageEventTarget, dealing 111111.00 damage of attack type Normal and damage type Normal
-
Set GCurrentSquadSize[TempInteger] = (GCurrentSquadSize[TempInteger] - 1.00)
-
-
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DamageEventTarget Equal to GLeader[TempInteger]
-
DamageEventAmount Less than 99999.00
-
-
Then - Actions
-
Else - Actions
-
Unit - Set life of TempUnit to ((Life of TempUnit) - DamageEventAmount)
-
Unit - Set life of DamageEventTarget to 100.00%
-
-
-
-
-
-