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
Need help saving world instances when moving to new worlds
By CSnoob, with 3 replies.
Last reply by Super_Hippo, almost 10 years ago:
Alright. Btw, line 15 doesn't do anything since you are doing the same thing in the next line again. And if you change the 'coastalFrame' in line 16 to 'this', you can also remove line 10 ;)
Have a Problem with my Script :/
By H0ly1812, with 2 replies.
Last reply by H0ly1812, almost 10 years ago:
Ok it works thanks
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>
424
425
426
427
428
429
430
X