No, that would be too easy.Perhaps he mean when a unit enter a region then order it to move or Attack-move.
check if the issuesd point is a part of region 02
Yes, ofcourse! Thanks a lot!)))
- ((Playable map area) contains (Target point of issued order)) Equal to True
Remember to clear any location leaks.
Okay, my WC started to turn off, I guess it's because of this trigger because that never happened before.It leaks locations, you will need to remove them if you want your map to perform well.
This returns a new location object which you use in...(Center of Bridge SE enter <gen>)
You never remove this object. Hence it leaks.(Distance between Try_To_Cross_Point[Player_Number_Int] and (Center of Bridge SE enter <gen>)) Less than or equal to 450.00
You are creating locations which you never remove. For example...
This returns a new location object which you use in...
You never remove this object. Hence it leaks.
You either need to assign it to a constant like variable at map initaliation and reference that variable each time (fastest) or you need to assign it to a temporary global/local variable which you then remove after using it for your distance check. Local declared local variables have another leak but that only applies if you use them (not available in GUI).
Yes that looks less leaky. However I do not understand why you need to use an array for it since the locations you create do not vary with player.
Except the value is constant (player invariant)?Because 2 or more units owned by different players can do it at the same time.
Except the value is constant (player invariant)?
Also it might still leak due to recursive nature of the trigger? The trigger fires itself before you clean up the location objects resulting in the variables being over written with new values and the old ones leaking.
One of the trigger's actions is to issue a point order to a unit. The trigger's event fires when a unit is issued a point order. Hence the trigger can fire itself. When this occurs multiple location leaks occur as new locations overwrite the old locations in the variables losing all reference to the old locations before the old locations are destroyed.How can trigger fire itself?
Which according to the logic for selecting directional locations makes no difference as the locations themselves are all constant.And about invariance - there can be any of 12 players.
Is player invariant? It is the same for all players. Hence it makes no sense why you are assigning it to a player variant variable just for leak removal.(Center of Bridge SW enter <gen>)
One of the trigger's actions is to issue a point order to a unit. The trigger's event fires when a unit is issued a point order. Hence the trigger can fire itself. When this occurs multiple location leaks occur as new locations overwrite the old locations in the variables losing all reference to the old locations before the old locations are destroyed.
Except they are global variables, not local variables.But all of those points are put into variables that makes them not to leak as they're under control
Except when...seems logical to me
Is run the trigger should fire again, resulting in...Unit - Order Try_To_Cross_Unit[Player_Number_Int] to Move To Bridge_SW_Point[Player_Number_Int]
All being set again, so the previous locations are lost before they were removed and hence leak.Set Try_To_Cross_Point[Player_Number_Int] = (Position of Try_To_Cross_Unit[Player_Number_Int])
Set Issue_Point[Player_Number_Int] = (Target point of issued order)
Set Bridge_SW_Point[Player_Number_Int] = (Center of Bridge SW enter <gen>)
Except they are global variables, not local variables.
Except when...
Is run the trigger should fire again, resulting in...
All being set again, so the previous locations are lost before they were removed and hence leak.
If you turn it off, run the actions then turn it back on then it should not leak. If it works depends on if it was intentionally recursive or not.OOOOOOOOH! Now I get it! And what if I'll turn off this trigger while ordering a unit to move to that point? Will it keep working after that?
If you turn it off, run the actions then turn it back on then it should not leak. If it works depends on if it was intentionally recursive or not.
I still do not see a reason for the location array however as the location still is player invariant.
Yes that would work. You could also make the turn off the first action and turn on the last action of the trigger. As long as there is not a thread crash between turn off and turn on it is fine.Can you help me to do it properly? Because I'm not sure if I know how to manage it
Will this option work in your opinion? http://prntscr.com/bgysp9
Yes those set actions.You mean these? http://prntscr.com/bgyrzd
Yes that would work. You could also make the turn off the first action and turn on the last action of the trigger. As long as there is not a thread crash between turn off and turn on it is fine.
Yes those set actions.