Simple "Can get there from here" function
Posted: 30 Apr 2010, 18:09
Can Unit X get from Point A to Point B? Or, at least, close enough to Point B to accomplish its assigned task?
If there was a function to easily determine that, my Central Build AI wouldn't try to send construction vehicles off to build on distant islands, or construction subs to build far inland. I think I've finally figured out the Lua Pathfinder enough to code a function to determine that.
Edit: I was wrong, of course. The code I initially posted didn't function properly, and some of the conclusions in the discussion that followed were incorrect. I removed them to keep from confusing anyone else. Check newer posts.
Anyway, the point of the whole exercise is to create some kind of small, simple drop-in function for any time a unit under widget control needs to know "can I get there from here?" Suggestions? Comments?
If there was a function to easily determine that, my Central Build AI wouldn't try to send construction vehicles off to build on distant islands, or construction subs to build far inland. I think I've finally figured out the Lua Pathfinder enough to code a function to determine that.
Edit: I was wrong, of course. The code I initially posted didn't function properly, and some of the conclusions in the discussion that followed were incorrect. I removed them to keep from confusing anyone else. Check newer posts.
Anyway, the point of the whole exercise is to create some kind of small, simple drop-in function for any time a unit under widget control needs to know "can I get there from here?" Suggestions? Comments?