how do I make a sprite go back and forth? I want it to go to the rock and back to the base. Is this possible?
There are a few ways to do this. You can use the sine behavior for simple back and forth motions.
Or you can try tween x/y from base to rock. On finished, trigger another tween that goes the other way and repeat.
Develop games in your browser. Powerful, performant & highly capable.
Same idea. Use the pathfinding "On Arrived" trigger to start the next leg/return trip. You can use an instance variable to keep track of which direction you are going, or rather where you need to go next.