All I do is pick units within range of a point and add it to a group, which damages those picked units every x seconds in another trigger.
I'm not sure if this one leaks. So should I destroy the LBRT_Grp array?
-
LBRT Move Hound
-
Events
- Time - Every 0.06 seconds of game time
- Conditions
-
Actions
- Set LBRT_Distance[0] = (LBRT_Distance[0] + 80.00)
- Set LBRT_Path[0] = (LBRT_TPoint[0] offset by LBRT_Distance[0] towards (Angle from LBRT_TPoint[0] to LBRT_TPoint[1]) degrees)
- Unit - Move LBRT_Hound instantly to LBRT_Path[0], facing (Facing of LBRT_Hound) degrees
- Set LBRT_Path[1] = (Position of LBRT_Hound)
- Set LBRT_Distance[1] = (Distance between LBRT_Path[1] and LBRT_TPoint[1])
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 166.00 of LBRT_Path[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is in LBRT_Grp[1]) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of LBRT_Caster)) Equal to True)))) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to LBRT_Grp[0]
- Special Effect - Create a special effect attached to the origin of (Picked unit) using Lightning.mdx
- Special Effect - Destroy (Last created special effect)
-
Loop - Actions
- Custom script: call RemoveLocation (udg_LBRT_Path[0])
- Custom script: call RemoveLocation (udg_LBRT_Path[1])
-
Events
-
LBRT Damage
-
Events
- Time - Every 0.30 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in LBRT_Grp[0] and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in LBRT_Grp[1]) Equal to False
-
Then - Actions
- Special Effect - Create a special effect attached to the origin of (Picked unit) using LightningT.mdx
- Special Effect - Destroy (Last created special effect)
- Unit - Cause LBRT_Caster to damage (Picked unit), dealing (((Real((Level of Lightning Beast Running Technique for LBRT_Caster))) x 4.00) x (Real((Agility of LBRT_Caster (Exclude bonuses))))) damage of attack type Spells and damage type Lightning
- Game - Display to (All players) the text: damage
- Unit Group - Add (Picked unit) to LBRT_Grp[1]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in LBRT_Grp[0] and do (Actions)
-
Events
-
LBRT Clean Up
-
Events
- Unit - A unit Dies
-
Conditions
- (Unit-type of (Dying unit)) Equal to Lightning hound
-
Actions
- Special Effect - Destroy LBRT_SFX[0]
- Special Effect - Destroy LBRT_SFX[1]
- Set LBRT_Distance[0] = (LBRT_Distance[0] - LBRT_Distance[0])
- Unit Group - Remove all units from LBRT_Grp[0]
- Unit Group - Remove all units from LBRT_Grp[1]
- Trigger - Turn off LBRT Move Hound <gen>
- Trigger - Turn off LBRT Damage <gen>
- Custom script: call RemoveLocation (udg_LBRT_TPoint[0])
- Custom script: call RemoveLocation (udg_LBRT_TPoint[1])
- Trigger - Turn off (This trigger)
-
Events
I'm not sure if this one leaks. So should I destroy the LBRT_Grp array?