This site requires JavaScript, please enable it in your browser!
Greenfoot back

What is happening right now?

danpost

reply to setSpeed() for a single Actor

By danpost - about 8 hours ago
I guess the other possibility is to double the width and height of the world and halve the cell size. Then, without changing the size of the images, you can have the bullet move faster. Actually from 21 x 14, you can go to 43 x 29, place and allow turning only on odd valued x- and y-coordinates so as not to really change anything other than non-bullet objects "half-stepping" it. This would also solve the bullet/edge issue. Restrict the rover and other non-bullet objects to x >= 1, y >= 1, x <= world width -2, and y <= world height - 2.
TobyRoby

reply to How do you detect a click in an area on the world

By TobyRoby - about 15 hours ago
awesome, thank you very much you beautiful greenfoot user <3
danpost

reply to How can I restart a loop early?

By danpost - about 18 hours ago
I think you may have a misunderstanding about the way the act method works. You need to program it for what you want done at each instance of time. The act method is repeatedly called while your project is in a running state -- which is like the initial animation loop. Assuming that there will always be a right or left path to go if not able to go forward: <Code Omitted>should be sufficient. A choice would need to be made if left and right were both possible ways to go. You can repeat line 2 (copy/paste as line 3) if you have dead ends.