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 make a counter that when the points are equal to 20 I play the sound I choose?
By Imonar, with no replies.
Problem Solved. I got it myself.
Create a shuffling method, Please help! Thanks
By avocasso, with 1 reply.
Replied to by danpost, almost 12 years ago:
What you need to do is pretty well spelled out in the description. Just look over the class APIs for java.util.Random, java.util.ArrayList and the interface java.util.List to determine what other methods (not specified above) you might need. Also, note what constructors are available for the classes.
Java APIs
Compiler warnings
By frederikam, with 3 replies.
Last reply by davmac, almost 12 years ago:
Please upgrade to Greenfoot 2.2.1. In future, always try the latest version before reporting problems, please.
Null Pointer Errors
By ajamesc97, with 3 replies.
Last reply by danpost, almost 12 years ago:
The first two ways should not be causing that error (maybe in something else you are doing, however). And any of the above ways will not add time between the adding of the new actor. You will need an int spawnTimer to control the duration of time waited to spawn the new actor.
Can't get Orb to bounce off of paddle...
By CHERNANDEZ95, with 2 replies.
Last reply by CHERNANDEZ95, almost 12 years ago:
Thanks for the help. Gonna go ahead and try it out.
Java heap space ERROR
By ajamesc97, with 6 replies.
Last reply by ajamesc97, almost 12 years ago:
Thanks! You've been a great help.
removeObject(s) method
By Gingervitis, with 16 replies.
Last reply by Gingervitis, almost 12 years ago:
I just re-arranged the code, and I found solution, but involves not using the 'null'.
Help ASAP!
By nitaadiningrum, with 3 replies.
Last reply by danpost, almost 12 years ago:
You need to show some effort. Post some attempted code. You may want to browse the Java tutorials, especially the first two sections on
Learning the Java Language
.
Bars
By AD12, with 1 reply.
Replied to by danpost, almost 12 years ago:
I posted a reply to this in my Progress bar/Health bar scenario comments.
Little Crab
By nitaadiningrum, with 1 reply.
Replied to by danpost, almost 12 years ago:
Add an instance integer field to be a life counter in the world class. Initialize its value to 2. In the world act method (or a method it calls), check to see if Crab is in the world, if not, decrement the life counter and then check its value; if the value is not zero, add the crab back into the world; otherwise start a new instance of the world. You may prefer to add the same Crab object back into the world after the first life is gone because the field holding the number of worms eaten will be zero if you add a NEW Crab object into the world. To accomplish this, add an instance Crab fi
Counter counts down by one when tool is used.
By kaciedy, with 1 reply.
Replied to by danpost, almost 12 years ago:
You need to track the state of the control key by adding an instance boolean field (I will call it controlDown). <Code Omitted>
hanldeOrbCollision
By CHERNANDEZ95, with 9 replies.
Last reply by CHERNANDEZ95, almost 12 years ago:
Ok, I see what you are saying. Makes sense. Again, thank you for your patience and sharing your knowledge with me.
Score----How do I do it?
By Eli.A, with 3 replies.
Last reply by danpost, almost 12 years ago:
tylers solution will work if you want to internally keep track of how many balloons have been popped. If you want to visibly display a running counter showing how many have been popped, you will need to create or import a Counter class, link it to the class that detects balloon popping and control it from there. NOTE: if only one counter object is going to be in your world, linking is not mandatory. The Counter class should be able to create and update the image (as the count changes) and have public method(s) to adjust the count value and to return the current value.
how to manually "Feed" an object
By CCLong2010, with 11 replies.
Last reply by danpost, almost 12 years ago:
Please supply the code for you FriendlyCat class at this point.
Exercise 5.4/5.5 in Greenfoot - Making on-screen piano
By PBnJwFluff, with 2 replies.
Last reply by PBnJwFluff, almost 12 years ago:
aaahhh okay thank you! I appreciate the help!!!
874
875
876
877
878
879
880
X