Variables
Delay between each "Spine" Default = 10
The number of "Spines" spawned Default = 70
The distance between each "Spine" Default = 60
AoE of each "Spine" Default = False
And whether the Spines do Friendly Fire damage or not. Default = False
NEW: Whether the same unit cannot take damage more then once from the same attacker by being within multiple AoE's of the attacker. Default = True
COMING SOON: The spines end at the acquired/targeted unit. Default = False
COMING SOON: Whether the spines will bounce in a random direction when they hit a unit or not. Default = False
Line Attack Clock

Events


Time - Every 0.05 seconds of game time

Conditions

Actions


For each (Integer LA_Integer) from 1 to L_MaxIndex, do (Actions)



Loop - Actions




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





If - Conditions






LA_AngleSet[LA_Integer] Equal to False





Then - Actions






Set L_AttackPoint[LA_Integer] = (Position of L_TargetUnit[LA_Integer])






Set L_PositionOfAttacker[LA_Integer] = (Position of L_Attacker[LA_Integer])






Set L_Angle[LA_Integer] = (Angle from L_PositionOfAttacker[LA_Integer] to L_AttackPoint[LA_Integer])






Set LA_AngleSet[LA_Integer] = True





Else - Actions




Set LA_AttackTimer[LA_Integer] = (LA_AttackTimer[LA_Integer] + 0.01)




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





If - Conditions






LA_AttackTimer[LA_Integer] Equal to L_SpineDelay[LA_Integer]





Then - Actions






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







If - Conditions








LA_SpineCounter[LA_Integer] Less than L_SpineCount[LA_Integer]







Then - Actions








Set LA_SpineCounter[LA_Integer] = (LA_SpineCounter[LA_Integer] + 1)








Set LA_AttackTimer[LA_Integer] = 0.00








Set LA_SpineDistance[LA_Integer] = (LA_SpineDistance[LA_Integer] + L_SpineDistance[LA_Integer])








Set L_SpineTempPoint[LA_Integer] = (L_PositionOfAttacker[LA_Integer] offset by LA_SpineDistance[LA_Integer] towards L_Angle[LA_Integer] degrees)








Custom script: set bj_wantDestroyGroup = true








Unit - Create 1 Lurker Attack Spine for (Owner of L_Attacker[LA_Integer]) at L_SpineTempPoint[LA_Integer] facing L_Angle[LA_Integer] degrees








Unit - Add a 3.00 second Generic expiration timer to (Last created unit)








Unit Group - Pick every unit in (Units within L_AoEOfSpine[LA_Integer] of L_SpineTempPoint[LA_Integer]) and do (Actions)









Loop - Actions










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











If - Conditions












(Picked unit) Not equal to L_Attacker[LA_Integer]












(Unit-type of (Picked unit)) Not equal to Lurker Attack Spine











Then - Actions












-------- Add more conditions above if you happen to add more units that you want to be immune. An example is already there, the Spines. --------












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













If - Conditions














L_FriendlyFire[LA_Integer] Equal to True













Then - Actions














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















If - Conditions
















L_DmgOnlyOnce[LA_Integer] Equal to True















Then - Actions
















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

















If - Conditions


















((Picked unit) is in L_DamagedUnits[LA_Integer]) Equal to False

















Then - Actions


















Unit Group - Add (Picked unit) to L_DamagedUnits[LA_Integer]


















Unit - Cause L_Attacker[LA_Integer] to damage (Picked unit), dealing L_Damage[LA_Integer] damage of attack type Normal and damage type Normal

















Else - Actions















Else - Actions
















Unit - Cause L_Attacker[LA_Integer] to damage (Picked unit), dealing L_Damage[LA_Integer] damage of attack type Normal and damage type Normal













Else - Actions














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















If - Conditions
















L_FriendlyFire[LA_Integer] Equal to False















Then - Actions
















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

















If - Conditions


















Or - Any (Conditions) are true



















Conditions




















((Picked unit) belongs to an enemy of (Owner of L_Attacker[LA_Integer])) Equal to True




















(Picked unit) Equal to L_TargetUnit[LA_Integer]

















Then - Actions


















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



















If - Conditions




















L_DmgOnlyOnce[LA_Integer] Equal to True



















Then - Actions




















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





















If - Conditions






















((Picked unit) is in L_DamagedUnits[LA_Integer]) Equal to False





















Then - Actions






















Unit Group - Add (Picked unit) to L_DamagedUnits[LA_Integer]






















Unit - Cause L_Attacker[LA_Integer] to damage (Picked unit), dealing L_Damage[LA_Integer] damage of attack type Normal and damage type Normal





















Else - Actions



















Else - Actions




















Unit - Cause L_Attacker[LA_Integer] to damage (Picked unit), dealing L_Damage[LA_Integer] damage of attack type Normal and damage type Normal

















Else - Actions















Else - Actions











Else - Actions








Custom script: call RemoveLocation (udg_L_SpineTempPoint[udg_LA_Integer])








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









If - Conditions










LA_SpineCounter[LA_Integer] Equal to L_SpineCount[LA_Integer]









Then - Actions










-------- LOCALS --------










Set LA_SpineCounter[LA_Integer] = LA_SpineCounter[L_MaxIndex]










Set LA_SpineCounter[L_MaxIndex] = 0










Set LA_SpineDistance[LA_Integer] = LA_SpineDistance[L_MaxIndex]










Set LA_SpineDistance[L_MaxIndex] = 0.00










Set L_DamagedUnits[LA_Integer] = L_DamagedUnits[L_MaxIndex]










Unit Group - Remove all units from L_DamagedUnits[L_MaxIndex]










Set LA_AngleSet[LA_Integer] = LA_AngleSet[L_MaxIndex]










Set LA_AngleSet[L_MaxIndex] = False










Set L_Angle[LA_Integer] = L_Angle[L_MaxIndex]










Set L_Angle[L_MaxIndex] = 0.00










Custom script: call RemoveLocation (udg_L_PositionOfAttacker[udg_LA_Integer])










Custom script: call RemoveLocation (udg_L_AttackPoint[udg_LA_Integer])










-------- GLOBALS --------










Set L_Attacker[LA_Integer] = L_Attacker[L_MaxIndex]










Set L_Attacker[L_MaxIndex] = No unit










Set L_TargetUnit[LA_Integer] = L_TargetUnit[L_MaxIndex]










Set L_TargetUnit[L_MaxIndex] = No unit










Set L_SpineDelay[LA_Integer] = L_SpineDelay[L_MaxIndex]










Set L_SpineDelay[L_MaxIndex] = 0.00










Set L_AoEOfSpine[LA_Integer] = L_AoEOfSpine[L_MaxIndex]










Set L_AoEOfSpine[L_MaxIndex] = 0.00










Set L_SpineCount[LA_Integer] = L_SpineCount[L_MaxIndex]










Set L_SpineCount[L_MaxIndex] = 0










Set L_SpineDistance[LA_Integer] = L_SpineDistance[L_MaxIndex]










Set L_SpineDistance[L_MaxIndex] = 0.00










Set L_Damage[LA_Integer] = L_Damage[L_MaxIndex]










Set L_Damage[L_MaxIndex] = 0.00










Set L_FriendlyFire[LA_Integer] = L_FriendlyFire[L_MaxIndex]










Set L_FriendlyFire[L_MaxIndex] = True










Set L_DmgOnlyOnce[LA_Integer] = L_DmgOnlyOnce[L_MaxIndex]










Set L_DmgOnlyOnce[L_MaxIndex] = True










Set L_MaxIndex = (L_MaxIndex - 1)









Else - Actions







Else - Actions





Else - Actions
Example Trigger

Events


Unit - A unit Is attacked

Conditions

Actions


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



If - Conditions




(Unit-type of (Attacking unit)) Equal to Lurker (Burrowed)



Then - Actions




-------- Copy/Paste these. These are needed for system functionality. --------




Set L_MaxIndex = (L_MaxIndex + 1)




Set L_TargetUnit[L_MaxIndex] = (Attacked unit)




Set L_Attacker[L_MaxIndex] = (Attacking unit)




-------- These are adjustables. You can change these, but not the ones above unless you know what your doing. --------




Set L_Damage[L_MaxIndex] = 30.00




Set L_SpineDelay[L_MaxIndex] = 0.04




Set L_SpineCount[L_MaxIndex] = 9




Set L_SpineDistance[L_MaxIndex] = 77.78




Set L_AoEOfSpine[L_MaxIndex] = 60.00




Set L_FriendlyFire[L_MaxIndex] = True




Set L_DmgOnlyOnce[L_MaxIndex] = False




-------- Run system once all adjustables are finished. --------




Trigger - Turn on Line Attack Clock <gen>



Else - Actions