Hi just wondering what's the correct way of destroying a point in a loop (in this case the udg_Chidori_Path[0])
Destroying it in every loop like this(the custom code is at the very last line):
Or destroying it once by placing it in the IF statement:
Destroying it in every loop like this(the custom code is at the very last line):
-
Chidori Move
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Set Chidori_Move = (Chidori_Move + 46.00)
-
Set Chidori_Path[0] = (Chidori_TLoc[0] offset by Chidori_Move towards (Angle from Chidori_TLoc[0] to Chidori_TLoc[1]) degrees)
-
-------- -------------------- --------
-
Unit - Move Chidori_Caster instantly to Chidori_Path[0], facing (Angle from Chidori_TLoc[0] to Chidori_TLoc[1]) degrees
-
Animation - Play Chidori_Caster's walk animation
-
Set Chidori_PathDistance = (Distance between Chidori_Path[0] and Chidori_TLoc[1])
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Chidori_PathDistance Less than or equal to 30.00
-
-
Then - Actions
-
Animation - Play Chidori_Caster's attack 2 animation
-
Special Effect - Destroy Chidori_SFX
-
Special Effect - Create a special effect attached to the origin of Chidori_Target using SuperShinyThingy3.mdx
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of Chidori_Target using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of Chidori_Path[0] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Chidori_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
-
Loop - Actions
-
Unit - Cause Chidori_Caster to damage (Picked unit), dealing (600.00 + ((2.00 x (Real((Level of Chidori for Chidori_Caster)))) x (Real((Agility of Chidori_Caster (Exclude bonuses)))))) damage of attack type Spells and damage type Lightning
-
-
-
-------- -------------------- --------
-
Animation - Change Chidori_Caster's animation speed to 100.00% of its original speed
-
Unit - Unpause Chidori_Caster
-
Unit - Unpause Chidori_Target
-
Set Chidori_Move = 0.00
-
Unit - Turn collision for Chidori_Caster On
-
Custom script: call RemoveLocation (udg_Chidori_TLoc[0])
-
Custom script: call RemoveLocation (udg_Chidori_TLoc[1])
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
Custom script: call RemoveLocation (udg_Chidori_Path[0])
-
-
-
Chidori Move
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Set Chidori_Move = (Chidori_Move + 46.00)
-
Set Chidori_Path[0] = (Chidori_TLoc[0] offset by Chidori_Move towards (Angle from Chidori_TLoc[0] to Chidori_TLoc[1]) degrees)
-
-------- -------------------- --------
-
Unit - Move Chidori_Caster instantly to Chidori_Path[0], facing (Angle from Chidori_TLoc[0] to Chidori_TLoc[1]) degrees
-
Animation - Play Chidori_Caster's walk animation
-
Set Chidori_PathDistance = (Distance between Chidori_Path[0] and Chidori_TLoc[1])
-
-------- -------------------- --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Chidori_PathDistance Less than or equal to 30.00
-
-
Then - Actions
-
Animation - Play Chidori_Caster's attack 2 animation
-
Special Effect - Destroy Chidori_SFX
-
Special Effect - Create a special effect attached to the origin of Chidori_Target using SuperShinyThingy3.mdx
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of Chidori_Target using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 400.00 of Chidori_Path[0] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of Chidori_Caster)) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
-
Loop - Actions
-
Unit - Cause Chidori_Caster to damage (Picked unit), dealing (600.00 + ((2.00 x (Real((Level of Chidori for Chidori_Caster)))) x (Real((Agility of Chidori_Caster (Exclude bonuses)))))) damage of attack type Spells and damage type Lightning
-
-
-
-------- -------------------- --------
-
Animation - Change Chidori_Caster's animation speed to 100.00% of its original speed
-
Unit - Unpause Chidori_Caster
-
Unit - Unpause Chidori_Target
-
Set Chidori_Move = 0.00
-
Unit - Turn collision for Chidori_Caster On
-
Custom script: call RemoveLocation (udg_Chidori_TLoc[0])
-
Custom script: call RemoveLocation (udg_Chidori_TLoc[1])
-
Custom script: call RemoveLocation (udg_Chidori_Path[0])
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-