This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
Discussions
You need to login to take part
Current Discussions
im a newbie.
By Francis1004, with 1 reply.
Replied to by danpost, about 11 years ago:
First, there are multiple ways to "move" your actors. How to make your actor move backwards depends on which technique you use to move it. Unless your world is unbounded, your actors will automatically be prevented from moving past any edge of your world. So, if moving in any one of the four cardinal directions (horizontally or vertically), you actor will stop at any edge. Then, it location (x- or y-coordinate value) can be used as a condition to change directions.
How to get java.awt.colour
By willy123, with 2 replies.
Last reply by willy123, about 11 years ago:
thanks
How to create scrolling world
By Gh0sty, with 8 replies.
Last reply by Gh0sty, about 11 years ago:
Thank you so much for your assistance! Is there any way you know of to increase Java Heap Memory?
Showing score at the end with counter
By Camyh15, with 1 reply.
Replied to by danpost, about 11 years ago:
Camyh15 wrote...
How do you make the counter show your score at the end of the game when it says "Game Over" or "You Win!"?
That depends on how you are creating the text "Game Over" or "You Win!". If using a GameOver world, add a method to it to receive the counter object and have that method change its image as needed and add it to the world. If using a GameOver actor, then have the current world do the necessary adjustments to the image of the counter and move it to a more central location in the world.
how to make the quiz question appear randomly
By frikakikimasive, with 9 replies.
Last reply by danpost, about 11 years ago:
frikakikimasive wrote...
But how can I find a way to create questions in this quiz appear random ?
That would depend on how you store the question, answer and options in fields.
Actor changing directions
By Camyh15, with 3 replies.
Last reply by danpost, about 11 years ago:
Camyh15 wrote...
This is not working because it says that there is "no suitable method found for setImage (no arguments)."
You need to put references to the images you are using for the parameter of the method. For example: <Code Omitted>
How to access Space methods
By hubert14, with 1 reply.
Replied to by danpost, about 11 years ago:
You cannot use 'getWorld()' alone because it returns a reference to a World object, not a Space object -- so the compiler does not know to look in the Space class for those methods unless you inform it that the returned object is indeed a Space object. This is does by casting its type: <Code Omitted>
How do I stop the background music?! (-.-')
By PikachuKirby, with 3 replies.
Last reply by danpost, about 11 years ago:
Your reference to the GreenfootSound object is created inside the constructor of the class and is lost as soon as the constructor finishes executing. At that point, there is no way to refer to it, to do any actions on it (pause, stop, restart, or whatever -- the methods of the GreenfootSound class cannot be executed on that sound because there is no way to refer to it). Notice how line 5 above refers to the sound (by the 'backgroundMusic' variable whose reference is created at line 4, within the constructor. By moving line 4 outside the constructor, the reference will be maintained as long
Space Invader direction change
By vondeser, with 3 replies.
Last reply by vondeser, about 11 years ago:
OK now what happens is only the first row seems to be affected by the statement, the rest of the aliens don't go left they drop down after hitting the right wall.
Bug report: Error: IOException writing debug log
By ellen.spertus@gmail.com, with 3 replies.
Last reply by davmac, about 11 years ago:
I've created an
entry for this in our bug database
. Thanks.
leaves-and-wombats
By bcribb, with 5 replies.
Last reply by MilanTiwari, about 11 years ago:
No we should download that scenario to work with that.
random falling
By Jeph, with 12 replies.
Last reply by Jeph, about 11 years ago:
thank your"ll its working fine @danpost @Super_Hippo @davmac lol sorry for the confusion before
Please help
By aromero2, with 2 replies.
Last reply by aromero2, about 11 years ago:
Thanks so much this really helped me grasp it!
need help with constructor error
By vmcalister81@yahoo.com, with 2 replies.
Last reply by vmcalister81@yahoo.com, about 11 years ago:
Thanks
How to get an image to go back to original once changed.
By JamesHughes, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
The simplest way to do it would be to add this line after line 7: <Code Omitted>This will set the image every act cycle no matter if it is needed or not. To avoid that, you could look at the following code. It only changes the image if the change is needed.
548
549
550
551
552
553
554
X