I am having this problem. When i click, i want it to navigate somewhere. I have got that working, but i want it so that when i click again, the loop inside stops - so i naturally used if(Greenfoot.mouseClicked(null)){clicked=true;} and then if(clicked){stop();break;} That doesn't work. Using println, Greenfoot.mouseClicked(null) continusouly reads as true while
I am moving. However, if(Greenfoot.isKeyDown("s")){clicked=true;} if(clicked){stop();break;} works completely fine.
Anyway i can force mouseClicked to reset.
Ps, already tried using mousePressed