I am working on a grid style movement system that takes into account the amount of spaces moved, this issue is that when using "Pathing Cost Between Points" doesn't account for Unpathable areas so i end up getting incorrect values, is there any way to work around this issue or a better condition suited to address this by chance?
You will have to find a way to determine the grid path before calculating the AI pathing cost. Once you do that, segment the path, then add the resulting costs together for a total. For example, say your grid path consists of 3 straight lines (A, B, and C.) A goes to the left, B goes up from the end of A, and C goes left from the end of B. Calculate the AI pathing cost for section A and store it in a variable. Then calculate the AI pathing cost for section B and add that to your variable. Finally, calculate the AI pathing cost for section C and add that to the variable for the total AI pathing cost.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am working on a grid style movement system that takes into account the amount of spaces moved, this issue is that when using "Pathing Cost Between Points" doesn't account for Unpathable areas so i end up getting incorrect values, is there any way to work around this issue or a better condition suited to address this by chance?
Thank you in Advance
http://www.sc2mapster.com/forums/development/triggers/57245-calculating-pathing-distance/#p1
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Use the ai pathing cost instead.
the AI pathing seems to be a improvement, but is there a way to get it to ignore diagonal movements?
@moonwatch89: Go
You will have to find a way to determine the grid path before calculating the AI pathing cost. Once you do that, segment the path, then add the resulting costs together for a total. For example, say your grid path consists of 3 straight lines (A, B, and C.) A goes to the left, B goes up from the end of A, and C goes left from the end of B. Calculate the AI pathing cost for section A and store it in a variable. Then calculate the AI pathing cost for section B and add that to your variable. Finally, calculate the AI pathing cost for section C and add that to the variable for the total AI pathing cost.