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
RED & BLUE TEAMS
By genju, with 3 replies.
Last reply by danpost, over 6 years ago:
genju wrote...
danpost wrote...
One idea is to use a program like Paint to add the coloring to the sprites. You know, have all the needed images already in your
images
folder for use in the scenario.
but would i not have to have separate files for both teams?
Yes. How would that be a problem?
Greenfoot Main Method/Class that contains initialization of Actor objects
By JosephMiller, with 1 reply.
Replied to by danpost, over 6 years ago:
In greenfoot, the main method is hidden. Greenfoot automatically constructs your initial world, which is where you jump in with your coding. You put code in your initial world constructor to create any initial actors needed and add them into the world (even if it is just calling a method to do it).
"Non-static method 'getY()' cannot be referenced from a static context"
By yeeterboi420, with 1 reply.
Replied to by Super_Hippo, over 6 years ago:
Remove line 5. First, this line is executed once when the Block object is created. It doesn’t change when the player moves. Second, a class doesn’t have a location. An object does. In your case, maybe the following could work: <Code Omitted> If you want the condition to be independent on the x-coordinate, you need to get a reference to the Player in the world: <Code Omitted>
iteration issue
By PreciseRook, with 2 replies.
Last reply by PreciseRook, over 6 years ago:
Ah, you're right. My bad, I thought I mentioned the null pointer. Moving the myWorld into act() fixed it, thank you!
How do I display the score?
By Ahmed780, with 55 replies.
Last reply by Ahmed780, over 6 years ago:
Thank you so much!!! It finally worked.
Can I use greenfoot for the ap csp create project
By scaps, with 1 reply.
Replied to by danpost, over 6 years ago:
scaps wrote...
title
That might be a question better directed at your instructor.
How do I create a splash screen ?
By Ahmed780, with 1 reply.
Replied to by danpost, over 6 years ago:
Ahmed780 wrote...
I need to create a 3 min splash screen for my final project
You can use my
Combo Support Demo
scenario as an example. You would only need to add the timer.
I'm having trouble starting my Greenfoot Project!
By MYSTICPHOENIXXX, with 2 replies.
Last reply by Yehuda, over 6 years ago:
Is there an output console minimized or open displaying any sort of error? Or perhaps a syntax error? Try restarting the Greenfoot program.
Want to add a delay between when the green spawn.
By scaps, with 4 replies.
Last reply by scaps, over 6 years ago:
alr got it working thanks a million
need help with bullet collision
By scaps, with 2 replies.
Last reply by scaps, over 6 years ago:
Thanks it worked!
Acces class of new world without instanciate it?
By ytm, with 3 replies.
Last reply by danpost, over 6 years ago:
ytm wrote...
hi danpost thanks for your reply! it is to do an integrative test. I want to test that when the key is pressed in world X, the second world is created
What code have you tried for checking key press and checking world creation?
What does this mean?
By Ahmed780, with 2 replies.
Last reply by danpost, over 6 years ago:
The statement: <Code Omitted>is a variable declaration statement. It declares a variable, called
water
, that is of type
Water
. That is,
water
will only be used to reference an object of type
Water
(aka: a
Water
instance). It is not being assign any object at this time and therefore will take on a default value of
null
. So, (d). I did not include (a) because no object is yet referenced by the variable. I did not include (b) because
water
is an object reference to a
Water
instance -- not a
Type
instance. I decl
Reset command
By CardJitsu5, with 1 reply.
Replied to by Super_Hippo, over 6 years ago:
You can put this into your act method. (Somewhere before line 46.) <Code Omitted>
Is there any symbol for "or"?
By Evstar14, with 3 replies.
Last reply by Kostya20052011, over 6 years ago:
Welcome)
plasmaeffect
By ronald, with 2 replies.
Last reply by ronald, over 6 years ago:
Good morning I just took over the plasma effect project I'll give you my code, it will be simpler I actually got rid of the bufferedimage the code works but I have a little trouble with the if for the moment the colors are displayed in full window but do not give color spots but this is due to the plasma, I think? Thank you for your help
126
127
128
129
130
131
132
X