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
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()'.
Creating a mute button
By SP00F3R, with 2 replies.
Last reply by TomazVDSN, over 13 years ago:
http://www.greenfoot.org/scenarios/7592
Calling methods from another actor
By tehe321, with 5 replies.
Last reply by tehe321, over 13 years ago:
Ok I was using actor enemy = getOneIntersectingObject(); instead so I switched it and it works thanks :)
Can someone help me with this?
By mikeyboy, with 2 replies.
Last reply by danpost, over 13 years ago:
One way to work it would be to use the mouse such that if a mouse button is pressed (mousePressed), then the pendulum is set to its starting position; and if the mouse button is released (mouseClicked), then the pendulum is allowed to swing. The mouse actions do not even have to occur on the pendulum itself. BTW, you can update a scenario you have uploaded onto the site by re-sharing it. Just use the same Title name.
Simple "if" statement causing problems.
By sqwuckies, with 2 replies.
Last reply by davmac, over 13 years ago:
See
this
. It's not the "if" that's causing the problem, it's the condition "getOneIntersectingObject(Plane.class) != null". You can't call getOneIntersectingObject from an actor that's not in the world. Your checkEdge method can remove the plane from the world, so that when seePlane is called, you get the exception.
My Collision detection isn't right
By dlanni, with 6 replies.
Last reply by dlanni, over 13 years ago:
Thanks.
An actor delete itself?
By FlyingRabidUnicornPig, with 3 replies.
Last reply by FlyingRabidUnicornPig, over 13 years ago:
Alright, thanks for the tips. I am still getting used to proper method names. I was thinking it would be an overall update, with different values being added/subtracted. Maybe I could have an "updateEverything()" method with individual update methods inside the update.
How do i make something Small?
By TheReapsz99, with 1 reply.
Replied to by Gevater_Tod4711, over 13 years ago:
To change the size of an actor you can either change the image of the actor (the file) or change the greenfootImage of the actor using the scale method. For example: <Code Omitted>
Boolean statements
By Gingervitis, with 11 replies.
Last reply by davmac, over 13 years ago:
You can use variables in the world (and in other classes) to control how things are done. For instance you could have one Arrow class with two int variables which determined where the turtle was sent.
874
875
876
877
878
879
880
X