Interact with objects in path

How would i go about creating a path that goes through interactable objects and interact with them as the player walks along the path. I’m trying to create a bot for motherlode mine

Use a path finding algorithm and the scene collision flags to find a path (ignoring rockfalls while doing so).
Then have the player follow that path while detecting rockfalls and clearing them (again based on collision flags).

Alright, do i build the path with the Movement class then or something like the AStar class? In the Movement class there is an argument for WalkingCondition but there is no documentation on how to use it? Do you maybe have a snippet for how to build the path?

Edit: Nvm i figured it out. You create a new object of WalkingCondition then override the getAsBoolean in the class

path = Movement.buildPath(new Position(3771, 5661, 0), new WalkCondition() {
        @Override
        public boolean getAsBoolean() {
            return //our walking condition//;
        }
    });

    path.walk();

Although it would be nice if i could build the path then create a for loop iterating through every tile in the path so i can predetermine if there is an object in the way and click on it before i’m next to it.

I meant you should implement Astar on your own. The built in one will not generate a path through the rockfalls. You’ll have to write everything from scratch

1 Like

How do i get the tilemap data then?
Is it Scene.getCollisionFlag()?

I was also looking into making a motherlode mine bot also. Did you even get something working @MrPeengu?