- Joined
- Mar 1, 2018
- Messages
- 41
Does adding and removing units from unitgroup overwrites the unitgroups creating leaks?
This was the trigger that got me with this question:
I was using Bribe's engine to check if the player has reflection (I should use the unit as reference for reflection but I don't really understand how to do it)
Hopefully it will work? I want to avoid infinite reflection loop if both DamageSource and DamageTarget have reflection.
Thanks in advance for the attention.
This was the trigger that got me with this question:
I was using Bribe's engine to check if the player has reflection (I should use the unit as reference for reflection but I don't really understand how to do it)
-
Dmg Reflect RealDecimal
-

Events
-


Game - DamageEvent becomes Equal to 1.00
-
-

Conditions
-

Actions
-


Set Damage_Refl_playerNr = (Player number of (Owner of DamageEventTarget))
-


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



If - Conditions
-




Damage_Reflect_Itms[Damage_Refl_playerNr] Greater than 0
-




(DamageEventSource is in Damage_Reflecting_Group) Equal to False
-
-



Then - Actions
-




Set Damage_CC_Reflect[Damage_Refl_playerNr] = (DamageEventAmount x Damage_CC_Reflect[Damage_Refl_playerNr])
-




Unit - Cause DamageEventTarget to damage DamageEventSource, dealing Damage_CC_Reflect[Damage_Refl_playerNr] damage of attack type Spells and damage type Normal
-




Unit Group - Add DamageEventTarget to Damage_Reflecting_Group
-




Floating Text - Create floating text that reads (String((Integer(Damage_CC_Reflect[Damage_Refl_playerNr])))) above DamageEventSource with Z offset 50.00, using font size 11.00, color (100.00%, 40.00%, 85.00%), and 0.00% transparency
-




Floating Text - Set the velocity of (Last created floating text) to 75.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 3.50 seconds
-




Floating Text - Change the fading age of (Last created floating text) to 1.40 seconds
-
-



Else - Actions
-




Unit Group - Remove DamageEventSource from Damage_Reflecting_Group
-
-
-
-
Hopefully it will work? I want to avoid infinite reflection loop if both DamageSource and DamageTarget have reflection.
Thanks in advance for the attention.
Last edited:




