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
What is the selution
By Lars2501, with 8 replies.
Last reply by Lars2501, almost 10 years ago:
thanks dan it worked!!!
Counter help!
By lostcoder21, with 1 reply.
Replied to by danpost, almost 10 years ago:
Please show the 'counter' field declaration line in the Background class.
How to create an image from clicking a button in one world to another
By Kieranwilko98, with 7 replies.
Last reply by Kieranwilko98, almost 10 years ago:
Danpost your a living legend, not all heros wear capes
how to make a swing object?
By williandutras, with 3 replies.
Last reply by danpost, almost 10 years ago:
You probably need to double the width or height of the image for the rope. Try this in the Rope class constructor ('public Rope()'): <Code Omitted>This will work if the image of the rope at zero rotation is hanging straight down. The code takes the original image and draws it on an image frame that is twice as tall, moving the point of rotation to the top of the original rope image.
The game does not what I want.
By Lars2501, with 6 replies.
Last reply by Lars2501, almost 10 years ago:
Thanks a lot bro you helped me a lot there
how find the wombat the leafes and move to them ?
By BoZZWombAT, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
There are several methods in the Actor class which you can use
(see here)
. If there is only one leaf, it could look like this:
new World in .jar application
By Ragtime, with 1 reply.
Replied to by jonguan, almost 10 years ago:
I had the same problem, and I figured that there is an error in the exporter, where it doesn't also bundle external .jar libraries as well. The libraries in question for me: <Code Omitted> I suspect that any external libraries are not being packaged into the jar
How to save and intersecting object?
By nathe2000, with no replies.
I am making a game where a "knight" will go up a lane and attack another object, like Clash Royal. My issue is that I need it to attack and the way that I thought of to do it was to save the object that the knight intersected with first, then have another method that would get that object and reduce its health. I don't know how to save the object that the knight intersected and how to get its health variable. This is my code so far...<Code Omitted> Any help would be appreciated. Thanks!
Bounded moving in tilebased world
By katenech, with 11 replies.
Last reply by katenech, almost 10 years ago:
Thank you for code and explanation. Now I'm doing scrolling world with big tilemap.
My code won't work
By Lars2501, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
The 'size' method returns a number, not a boolean. You could check if the number is higher than 0. Or you could use the 'isEmpty' method.
Greenfoot Chapter 6 Drill and Practice
By DocWhiskey, with 4 replies.
Last reply by DocWhiskey, almost 10 years ago:
danpost wrote...
Calling a method from within itself is not something you should do without great care (as coded above, the calling of the method will continue indefinitely, causing the project to throw an exception); anyway, Super_Hippo said to call the method from the constructor -- not from the method itself.
Didn't realize i added setup() there actually thats my bad, i figured it out for the most part though thanks for the help guys
What is causing this error?
By smartinez, with 1 reply.
Replied to by danpost, almost 10 years ago:
smartinez wrote...
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Probably too many or oversized images; possibly large sound files; too many objects in your world; or, any combination of these.
Need help with code for World
By Lars2501, with 1 reply.
Replied to by danpost, almost 10 years ago:
A single equal sign, '=', is an assignment operator; and you cannot assign a value to a method call. The operator you need to use is the conditional equality operator, which is a double equal sign, '=='. Also, the 'ready' method, which returns a boolean value (or any method that return anything) must have a 'return' statement. I believe the method should read: <Code Omitted>
Need help to Count
By McBremen, with 1 reply.
Replied to by danpost, almost 10 years ago:
You need to show (1) the class where the integer is located (indicate which integer it is); (2) the class that needs to add 1 to that integer (indicate where it is to do it); and (3) explain what the integer is to hold and how that value is used in other parts of the program.
Using a while loop to add bubbles in horizontal/diagonal line
By georgette, with 3 replies.
Last reply by danpost, almost 10 years ago:
You should not need a reference field for any of the bubbles (remove line 4); and the bubble created and added into the world with lines 15 and 16 are not part of any of your required set (remove those two lines). Still you are creating a bubble and not doing anything with it (line 29); remove that line. If you want to create 21 bubbles each at the center and at random locations, then change '10' in line 27 to '21'. The second while loop again will never execute. You initialize x to '300' a value greater than '11', which the loop requires the value of x to be less than.
424
425
426
427
428
429
430
X