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
Problem with sidecrolling
By kante162, with no replies.
Hi guys, I habe a little problem with my jump'n'run-game
(Scenario here)
, which I can't exactly describe. It's like some scrolling objects are stuck for a moment when switching the direction. After a couple of times switching the direction, the whole level is "destroyed" and you have to restart the level. I thought it might be a problem with the checkKeyPress()-method in the Scrollers class, but i didn't really figure it out. Maybe you could help me please?
Group Project for Beginners?
By askgriff, with 3 replies.
Last reply by davmac, over 13 years ago:
askgriff, if you're an educator you may like to consider signing up to the
Greenroom
and asking your question there.
cannot find symbol method canSee
By sfr123, with 3 replies.
Last reply by danpost, over 13 years ago:
Did you import the Animal class into your scenario? On the menubar, click on Edit>Import class..., choose Animal and click Import.
word wrapping
By tylers, with 1 reply.
Replied to by tylers, over 13 years ago:
done it now but i might need a simpler method ;)
Breakout help
By chris553, with 2 replies.
Last reply by chris553, over 13 years ago:
java.awt.color has been imported at the beginning of the class so java.awt.Color.BLUE is not necessary. I guess instantiated wasn't the proper term. I meant the variable color has been declared. I have tried to do that and I tried it again and thank you for mentioning that because yes that worked. I swear I tried that and it didn't work. I guess I needed another person telling me to try it again. Thanks danpost.
Need Levelsplit HOW CAN I DO THIS??
By Prish950, with 3 replies.
Last reply by danpost, over 13 years ago:
If what you are saying is to create a superclass for all the world levels with two methods in it (one for determining the level to advance to and the other to determine the level to reset), then, yes, that is one viable possibility. It is probably the appropriate one also; otherwise, you would have to write those two methods in all the world level classes. An alternate possibility is to create an array of the level world classes in the initial world. Pass the array from world to world. When not resetting the world but advancing to the next, remove the first item from the array before pas
Need My Actor to Respawn After hitting Left Wall
By Nz-Tank, with 9 replies.
Last reply by danpost, over 13 years ago:
If the sound file for the ambient sound is a very large sound file, that may have something to do with it; otherwise, I could not say.
why do i see a gray square?
By tylers, with 4 replies.
Last reply by danpost, over 13 years ago:
For one thing, lines 22 is useless. You are setting 'img' to a new image; then two lines later setting 'img' to the image of the object that has been scaled, which eliminates the image created. What is causing the gray image is line 45, which scales the same image multiple times, which tends to distort the original image. I have also noticed that you have an excessive number of variables in the class. Compare the following with what you had:
How do i remove a object?
By kante162, with 3 replies.
Last reply by danpost, over 13 years ago:
The 'removeObject' method is being used (at line 14) to remove the 'pauseScreen' object that is created at line 4. This PauseScreen object has not yet been placed in the world so nothing is actually removed. The remove the one that is already in the world, change line 14 to <Code Omitted>(1) You can remove the 'answer' field totally (remove lines 10, 16 and 18; also, the 'answer' field declaration in this class; and change the method declaration to 'public void pause()' ). Use '!getWorld().getObjects(PauseScreen.class).isEmpty
How to use an Third-party libraries in Greenfoot
By Upupzealot, with 1 reply.
Replied to by erdelf, over 13 years ago:
didnt tried that, but click on edit, preferences and libraries and add your jar file to the list
New Greenfoot4Android discussion
By groengeel, with 106 replies.
Last reply by erdelf, over 13 years ago:
thx for the answer. Could you post your todo list with your progress?
what's save the world?
By Velociraptor06, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
Save the world is a funktion of Greenfoot to save every actor that is in the world at the moment. All actors and there current location will be writen down in a method in the world subclass that is written by Greenfoot itselves. So you don't have to write anything and Greenfoot will do all the work for you. And then if you compile your scenario and create a new world the next time the actory you have saven will be at the position you saved them.
change to world
By budihck, with 1 reply.
Replied to by danpost, over 13 years ago:
If you are asking about changing the background image of the world, the World class documentation of the Greenfoot API (accessed via the 'Documentation' link near the top of the page) has methods that deal with getting and setting the background image. The image is a GreenfootImage object, so you may want to see what methods are available in that class also (as well as its constructors).
Help with error
By henrYoda, with 6 replies.
Last reply by henrYoda, over 13 years ago:
Oh ok i see thank you
How do u undo 'save the world' in greenfoot?
By gquach, with 1 reply.
Replied to by danpost, over 13 years ago:
Just open code panel for the world class you want to remove 'undo' the 'save the world' in and delete the line 'prepare();' from the constructor and the complete method declared with 'public void prepare()'.
874
875
876
877
878
879
880
X