ID:156624
 
Hi. I'm sorry to be posting this in this specific forum, as, it may belong in Code Problems. The thing is, I know this would require INTENSE math, and I am quite bad with my math skills. Not sure I should be programming, but, I enjoy it.

Overall, I want to make a get_dist proc that doesn't use diagonals, and puts obstacles into account. Does anyone have a library, or is there an actual proc for this? Thank you!
Search for A* pathfinding. It's easier than you may thing.

There is no linear solution, though, it's pretty processor heavy.
In response to Ter13
Ter13 wrote:
Search for A* pathfinding. It's easier than you may thing.

There is no linear solution, though, it's pretty processor heavy.

A* Did the trick, thank you Ter13!

I basically just used the A*GetPath, and checked its length (Number of turfs, the minimum amount) compared to the players max movement, and if it was less or same, it lets them move there.