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
Greenfoot Chapter 10 MP3 Player
By t_o98, with 3 replies.
Last reply by danpost, over 8 years ago:
t_o98 wrote...
Thank you that worked! Line 4 is to implement a volume bar that I haven't really started on yet.
Strange for the image to be almost square. Also, it would seem appropriate for it to be in the class of the bar actor class itself -- not in the world class.
Intersecting Actors
By Lavenger, with 4 replies.
Last reply by Lavenger, over 8 years ago:
danpost wrote...
Line 1 should be '!= null' -- not '== true'. Although, more simply would be: <Code Omitted> Line 3 should be <Code Omitted>
ahh okay, thanks ^^
Whats the Problem?
By Asuna, with 1 reply.
Replied to by danpost, over 8 years ago:
Avoid naming a
List
object (btw, the type is
List
-- not
list
) by combining the problem line with the line below it (which uses the list): <Code Omitted>Otherwise you would need to
import
the
java.util.List
class (by code).
How do I initialise an actor?
By Navique, with 7 replies.
Last reply by danpost, over 8 years ago:
Navique wrote...
The ManaSpecs have no code whatsoever, aside from allowing them to be used by the Rocket class. The rocket is what the player controls. All the ManaSpecs have the same image, but they do not link up.
Seems to me that they are an image set used to display a value -- in this case
mana/1000
. Maybe you should take a look at my
Value Display Tutorial
scenario.
How to make add same objects that act seperately
By snake_case, with 4 replies.
Last reply by snake_case, over 8 years ago:
Thanks so much! this is working perfectly now. I cannot express how relieved I am to have this issue finally be resolved. Again, thanks for the help!
Changing color
By VladislavMoldovan, with 1 reply.
Replied to by bravdwal, over 8 years ago:
I think the setColor(color color)-method of the GreenfootImage class should suffice. More info: https://www.greenfoot.org/files/javadoc/greenfoot/GreenfootImage.html#setColor-greenfoot.Color- and: https://www.greenfoot.org/files/javadoc/greenfoot/Color.html
Converting types
By VladislavMoldovan, with 1 reply.
Replied to by danpost, over 8 years ago:
The
isKeyDown
method returns a
boolean
(
true
/
false
) value which cannot be converted to an
int
value. This appears to be what you are trying to do in lines 10 and 11. You can declare the
int
variables prior to the
isKeyDown
checks and increment them when the
boolean
value returned is
true
: <Code Omitted>
IOException/try
By RevoltecX7, with 1 reply.
Replied to by Vercility, over 8 years ago:
Ehh, everything u wanna do goes into try, then whatever should happen when it fails goes into catch e.g <Code Omitted>
How do i add more than 1 to an int value?
By Recorsi, with 2 replies.
Last reply by Recorsi, over 8 years ago:
Thanks
Counter problems
By HecticKiwi, with 5 replies.
Last reply by HecticKiwi, over 8 years ago:
Argh I knew it was something simple like that, I'd tried putting MyWorld in various places in eatFruit() but obviously hadn't tried that one. Thanks a bunch :)
Having multiple worlds?
By Dad, with 5 replies.
Last reply by Dad, over 8 years ago:
Ok, thank you so much
help on projects
By Miguel.Valdez, with no replies.
don't really need help with an assignment. Rather just want to recognize and thank Danpost for being the true MVP on mainly helping everyone with our questions. Yet alone, he has taught me so much about how things should function. THANK YOU.
Newtons Lab book assignment 8.42
By arutledge20, with 1 reply.
Replied to by danpost, over 8 years ago:
arutledge20 wrote...
Touched is my boolean. For some reason, planets that touch it do not toggle it. This code is in a void with my other code that cycles through images and plays sounds. When I move the code to be in the act method, it will change, but only if a body was placed into the world on top of it. After the first change from that body, it doesn't change ever again. What is wrong with this code?
Nothing is wrong with the code shown (as far as what can be determined by what was given). What is wrong is probably in code that you have not shown (yet).
Getting error with Greenfoot.playSound()
By fionn88, with 2 replies.
Last reply by fionn88, over 8 years ago:
I tried both this morning, but still no luck. What else can I try? I'm trying to attach a screenshot so you can see my code, the errors I'm getting, and the name of the file/file location. http://i393.photobucket.com/albums/pp18/pprioli/Greenfoot%20errors.jpg
Randomly rotate objects?
By Recorsi, with 6 replies.
Last reply by Recorsi, over 8 years ago:
danpost wrote...
Recorsi wrote...
Vercility wrote...
<Code Omitted>
Thanks
I do not see any randomness in the rotation of the rocks.
No problem, i just changed it a bit:
272
273
274
275
276
277
278
X