I'm comparing "distance between points" and "pathing cost between points" to check if a unit could move from A to B without having to turn any corners or avoid any obstacles on the map. Unfortunately the pathing cost is returned as an integer value, which makes the comparison quite inaccurate.
I stripped down the trigger to make it easier to understand. But basically, I'd like to be able to narrow the +-1 spread as low as possible to get an accurate check for obstacles.
I'm toying with the idea of using two invisible units. One flying and one.. err.. "grounded" and compare the travel time of them, but I need the check to be instant or what I'm trying to accomplish will look very odd.
I don't get how ground pathing cost can be an Integer. Blizz must have cut off the decimals or something which is beyond me why they would do.
Hmm, maybe checking every point with 0.1 steps towards the destination checking if ground pathing is open. Dunno, guess it's worth a shot.
Edit:
It works. I cut out a lot of the trigger, but here's the meat of it for anyone who wants it.
I'm comparing "distance between points" and "pathing cost between points" to check if a unit could move from A to B without having to turn any corners or avoid any obstacles on the map. Unfortunately the pathing cost is returned as an integer value, which makes the comparison quite inaccurate.
I stripped down the trigger to make it easier to understand. But basically, I'd like to be able to narrow the +-1 spread as low as possible to get an accurate check for obstacles.
I'm toying with the idea of using two invisible units. One flying and one.. err.. "grounded" and compare the travel time of them, but I need the check to be instant or what I'm trying to accomplish will look very odd.
I don't get how ground pathing cost can be an Integer. Blizz must have cut off the decimals or something which is beyond me why they would do.
Hmm, maybe checking every point with 0.1 steps towards the destination checking if ground pathing is open. Dunno, guess it's worth a shot.
Edit:
It works. I cut out a lot of the trigger, but here's the meat of it for anyone who wants it.