- Joined
- May 11, 2012
- Messages
- 2,103
How do I damage units once they come near the Ball using either buff or unit groups?
I've been trying with both, and it led me to failure.
Here's the trigger if you need it:
I've been trying with both, and it led me to failure.
Here's the trigger if you need it:
-
Ball Of Lightning Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
- -------- ================================================ --------
-
For each (Integer BoL_Loop) from 1 to BoL_MaxIndex, do (Actions)
-
Loop - Actions
- -------- ================================================ --------
- Set BoL_Point[1] = (Position of BoL_Dummy2[BoL_Loop])
- Set BoL_Point[2] = (Position of BoL_Dummy[BoL_Loop])
- -------- ================================================ --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between BoL_Point[1] and BoL_Point[2]) Greater than 1000.00
-
Then - Actions
- -------- ================================================ --------
- Unit - Kill BoL_Dummy[BoL_Loop]
- Unit - Kill BoL_Dummy2[BoL_Loop]
- -------- ================================================ --------
- Set BoL_TrigUnit[BoL_Loop] = BoL_TrigUnit[BoL_MaxIndex]
- Set BoL_TrigUnit[BoL_MaxIndex] = No unit
- Set BoL_Dummy[BoL_Loop] = BoL_Dummy[BoL_MaxIndex]
- Set BoL_Dummy[BoL_MaxIndex] = No unit
- Set BoL_Dummy2[BoL_Loop] = BoL_Dummy2[BoL_MaxIndex]
- Set BoL_Dummy2[BoL_MaxIndex] = No unit
- Set BoL_SpellLvl[BoL_Loop] = BoL_SpellLvl[BoL_MaxIndex]
- Set BoL_DamageDealt[BoL_Loop] = BoL_DamageDealt[BoL_MaxIndex]
- Set BoL_Angle[BoL_Loop] = BoL_Angle[BoL_MaxIndex]
- Set BoL_MaxIndex = (BoL_MaxIndex - 1)
- Set BoL_Loop = (BoL_Loop - 1)
- -------- ================================================ --------
-
Else - Actions
- -------- ================================================ --------
- Set BoL_Point[3] = (BoL_Point[2] offset by 10.00 towards BoL_Angle[BoL_Loop] degrees)
- Set BoL_UnitGroup[1] = (Units within 150.00 of BoL_Point[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is in BoL_UnitGroup[2]) Equal to False) and (((Life of (Matching unit)) Greater than 0.41) and (((Matching unit) belongs to an enemy of (Ow
- -------- ================================================ --------
-
Unit Group - Pick every unit in BoL_UnitGroup[1] and do (Actions)
-
Loop - Actions
- Unit - Cause BoL_TrigUnit[BoL_Loop] to damage (Picked unit), dealing BoL_DamageDealt[BoL_Loop] damage of attack type Spells and damage type Normal
- Unit Group - Add (Picked unit) to BoL_UnitGroup[2]
-
Loop - Actions
- -------- ================================================ --------
- Unit - Move BoL_Dummy[BoL_Loop] instantly to BoL_Point[3]
- -------- ================================================ --------
- Custom script: call RemoveLocation(udg_BoL_Point[3])
- Custom script: call DestroyGroup(udg_BoL_UnitGroup[1])
- -------- ================================================ --------
-
If - Conditions
- -------- ================================================ --------
- Custom script: call RemoveLocation(udg_BoL_Point[1])
- Custom script: call RemoveLocation(udg_BoL_Point[2])
- -------- ================================================ --------
-
Loop - Actions
- -------- ================================================ --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- BoL_MaxIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- -------- ================================================ --------
- Custom script: set udg_BoL_UnitGroup[1] = null
- Custom script: set udg_BoL_Point[2] = null
- Custom script: set udg_BoL_Point[3] = null
-
Events