Simplistic pathfinding
Posted: Tue Mar 12, 2024 8:26 pm
Here's something for anyone's amusement.
I'm sure it can be improved upon, by anyone with a grasp of basic maths. (not me).
Seems to pick it's way around the green obstacle most of the time. (Let's generously call that a hedge)
Drag the X (x marks the destination), and the A is the player / zombie / (whatever), which has to get to the X.
Choosing the pointer tool stops everything in it's tracks. Alternatively, you can also drag stuff around while it's running (non blocking)
All the script is just in the two buttons shown.
I'm sure it can be improved upon, by anyone with a grasp of basic maths. (not me).
Seems to pick it's way around the green obstacle most of the time. (Let's generously call that a hedge)
Drag the X (x marks the destination), and the A is the player / zombie / (whatever), which has to get to the X.
Choosing the pointer tool stops everything in it's tracks. Alternatively, you can also drag stuff around while it's running (non blocking)
All the script is just in the two buttons shown.