Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I check pathability in my resource Teeth so that each projectile doesn't continue if it collides with trees, ravines, cliffs, or destructibles.
View attachment 368146
And for destructibles
View attachment 368147
@Nastyan
I do not understand, perhaps posting your trigger would be more direct.
Bruiser Init

Events


Time - Elapsed game time is 0.01 seconds

Conditions

Actions


Set BruiserW_index = 0


Set BruiserW_dash_speed = 40.00


Set BruiserW_dash_collision = 32.00
BruiserW Cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Dash

Actions


Set BruiserW_index = (BruiserW_index + 1)


Set BruiserW_dash_caster[BruiserW_index] = (Triggering unit)


Set BruiserW_dash_targetpoint[BruiserW_index] = (Target point of ability being cast)


Set BruiserW_dash_casterpos[BruiserW_index] = (Position of BruiserW_dash_caster[BruiserW_index])


Set BruiserW_dash_angle[BruiserW_index] = (Angle from BruiserW_dash_casterpos[BruiserW_index] to BruiserW_dash_targetpoint[BruiserW_index])


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



If - Conditions




BruiserW_index Equal to 1



Then - Actions




Custom script: call EnableTrigger(gg_trg_BruiserW_Travel)



Else - Actions
BruiserW Travel

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer BruiserW_loopteger) from 1 to BruiserW_index, do (Actions)



Loop - Actions




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





If - Conditions






Or - Any (Conditions) are true







Conditions








(BruiserW_dash_caster[BruiserW_loopteger] is dead) Equal to True





Then - Actions






Set BruiserW_dash_caster[BruiserW_loopteger] = BruiserW_dash_caster[BruiserW_index]






Set BruiserW_index = (BruiserW_index - 1)






Set BruiserW_loopteger = (BruiserW_loopteger - 1)






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







If - Conditions








BruiserW_index Equal to 0







Then - Actions








Trigger - Turn off (This trigger)







Else - Actions





Else - Actions






-------- ------------------------------------------------------ --------






-------- Dashing through a structure is allowed --------






-------- ------------------------------------------------------ --------






Set BruiserW_dash_casterpos[BruiserW_loopteger] = (Position of BruiserW_dash_caster[BruiserW_loopteger])






Set BruiserW_dash_moveloop[BruiserW_loopteger] = (BruiserW_dash_casterpos[BruiserW_loopteger] offset by BruiserW_dash_speed towards BruiserW_dash_angle[BruiserW_loopteger] degrees)






Unit - Move BruiserW_dash_caster[BruiserW_loopteger] instantly to BruiserW_dash_moveloop[BruiserW_loopteger], facing BruiserW_dash_angle[BruiserW_loopteger] degrees






Set BruiserW_dash_Distance[BruiserW_loopteger] = (Distance between BruiserW_dash_casterpos[BruiserW_loopteger] and BruiserW_dash_targetpoint[BruiserW_loopteger])






Destructible - Pick every destructible within BruiserW_dash_collision of BruiserW_dash_moveloop[BruiserW_loopteger] and do (Actions)







Loop - Actions








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









If - Conditions










((Last created destructible) is invulnerable) Equal to True









Then - Actions










Set BruiserW_dash_caster[BruiserW_loopteger] = BruiserW_dash_caster[BruiserW_index]










Set BruiserW_index = (BruiserW_index - 1)










Set BruiserW_loopteger = (BruiserW_loopteger - 1)










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











If - Conditions












BruiserW_index Equal to 0











Then - Actions












Trigger - Turn off (This trigger)











Else - Actions









Else - Actions






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







If - Conditions








Or - Any (Conditions) are true









Conditions










BruiserW_dash_Distance[BruiserW_loopteger] Less than or equal to 0.00










(Terrain pathing at BruiserW_dash_moveloop[BruiserW_loopteger] of type Walkability is off) Equal to True







Then - Actions








Set BruiserW_dash_caster[BruiserW_loopteger] = BruiserW_dash_caster[BruiserW_index]








Set BruiserW_index = (BruiserW_index - 1)








Set BruiserW_loopteger = (BruiserW_loopteger - 1)








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









If - Conditions










BruiserW_index Equal to 0









Then - Actions










Trigger - Turn off (This trigger)









Else - Actions







Else - Actions






Custom script: call RemoveLocation(udg_BruiserW_dash_casterpos[udg_BruiserW_loopteger])






Custom script: call RemoveLocation(udg_BruiserW_dash_moveloop[udg_BruiserW_loopteger])
Example

Events


Time - Every 0.03 seconds of game time

Conditions

Actions
For each (Integer Your_Loop) from 1 to Your_Index, do (Actions)

Loop - Actions


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



If - Conditions




(Your_Unit_Variable is dead) Equal to False




Your_distance_Variable Greater than 0.00




(Terrain pathing at Your_Point_Variable of type Walkability is off) Equal to False



Then - Actions




-------- -- --------




-------- -- --------




-------- -- --------




-------- -- --------




-------- -- --------




-------- Your actions --------




-------- -- --------




-------- -- --------




-------- -- --------




-------- -- --------




-------- -- --------




Destructible - Pick every destructible within Your_Collision_Variable of Your_Point_Variable and do (Actions)





Loop - Actions






Set VariableSet Your_distance_Variable = 0.00



Else - Actions




-------- -- --------




-------- -- --------




-------- -- --------




-------- De-Index block --------




-------- -- --------




-------- -- --------




-------- -- --------
In your periodic try and make the conditions for a "dead-end", i.e. when the spell is going to fail and de-index, try to use only instance.
If you must use an additional "if then" block then use a variable that can act as a flag for de-indexing, in my Teeth resource I do this with the variable called TeNe_distance, if the projectile hits a tree I set the distance to 0.00 instead of adding another de-indexing block, because when the loop fires a second time the de-index condition will catch that distance is 0.00 and know to de-index that instance.
The result allows your trigger to be readable, not only to others but yourself, and that leads to a cleaner thought process.
Example
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer Your_Loop) from 1 to Your_Index, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Your_Unit_Variable is dead) Equal to False
Your_distance_Variable Greater than 0.00
(Terrain pathing at Your_Point_Variable of type Walkability is off) Equal to False
Then - Actions
-------- -- --------
-------- -- --------
-------- -- --------
-------- -- --------
-------- -- --------
-------- Your actions --------
-------- -- --------
-------- -- --------
-------- -- --------
-------- -- --------
-------- -- --------
Destructible - Pick every destructible within Your_Collision_Variable of Your_Point_Variable and do (Actions)
Loop - Actions
Set VariableSet Your_distance_Variable = 0.00
Else - Actions
-------- -- --------
-------- -- --------
-------- -- --------
-------- De-Index block --------
-------- -- --------
-------- -- --------
-------- -- --------
Also if you haven't, check out this tutorial.