L
locklock
Guest
hello! I'm trying to do turn-based pathfinding and hit some trouble:
I'm using a mp_grid, and would like to supply a starting grid_x/grid_y, a target grid_x/grid_y, and return the grid position one step towards the goal.
however, all the mp_grid (and mp_potential_step, which looked promising) functions seem to only return booleans. Am I missing an obvious way to get these coords?
thanks for any help!
I'm using a mp_grid, and would like to supply a starting grid_x/grid_y, a target grid_x/grid_y, and return the grid position one step towards the goal.
however, all the mp_grid (and mp_potential_step, which looked promising) functions seem to only return booleans. Am I missing an obvious way to get these coords?
Code:
// where I'm starting from:
GRID = mp_grid_create(0, 0, 10, 10, 10);
PATH = path_add();
mp_grid_path(GRID, PATH, starting_x, starting_y, target_x, target_y, 0) ;
thanks for any help!
Last edited by a moderator: