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

What is happening right now?

danpost

reply to How can I set a Endscreenimage when my actor gets destroyed by a bomb?

By danpost - about 13 hours ago
You could also write it like this in the act method: <Code Omitted>and add the following method to the World subclass: <Code Omitted>
danpost

reply to How I can put a GIF in my Project?

By danpost - about 12 hours ago
My Animation class can be made to run exactly one cycle of images just by setting a cycle count field. My GifImage vs Animation scenario contains both the Animation class as well as the GifImage class provided by greenfoot and shows the various differences between them. Also, my Animation Support Class scenario demos a single cycle usage. Well, I see that it does 6 cycles (which looks like one visually) because the pattern repeats 6 times.
davmac

reply to [@Greenfoot Team] Center uploaded Greenfoot scenarios in the browser

By davmac - about 16 hours ago
We're pretty much due to re-vamp the whole site a bit, though I can't say how long that might take. However, I'll take a look soon (in the next few days) and see if there's a simple way to make this work better. In general though, if you have a scenario that's wider than the current Greenfoot site, you should be aware that it's not going to be particularly usable for all users - some of whom actually have a smaller screen.
danpost

reply to How to move the actor up and down

By danpost - about 16 hours ago
After moving, check the changed coordinate by comparing it to whatever limit you set for the direction moved. If passed the limit, move the actor back to that limit (using 'setLocation'). For example, to limit movement to the right so the actor does not go off the visible world: <Code Omitted>You can change the '1's to a larger value to put more of the actor in the world. Using 'getImage().getWidth()/2' instead of the '1's will place the actor at the edge and totally visible (no part of the actor passed the edge).