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
Im trying to spawn a different monster in myWorld but i cant figure it out.
By ambrokato, with 17 replies.
Last reply by ambrokato, over 4 years ago:
danpost wrote...
In
switchToShop
if statements, add condition of what current level should be.
Came back to say Thanks Dan! appreciate your help!
Nevermind, I figured it out. I feel really silly.
By DrJ, with no replies.
He forgot to set an image with the subclass.
a little green foot image is where a red circle should be
By DrJ, with 1 reply.
Replied to by Super_Hippo, over 4 years ago:
The green foot appears if there isn’t a default image assigned to the class and the actor didn’t call the “setImage” method.
lucky ducky
By gnayron007, with 1 reply.
Replied to by Super_Hippo, over 4 years ago:
What did you try?
How to create a scrolling world
By HarrisonCate, with 1 reply.
Replied to by Game/maniac, over 4 years ago:
Danpost has made a really good tutorial for scrolling worlds here: https://www.greenfoot.org/scenarios/18226
isKeyDown workaround?
By ShadowJL, with 5 replies.
Last reply by ShadowJL, over 4 years ago:
Thanks, jumping works fine now.
Not landing correctly (platformer)
By CreatorMoon, with 14 replies.
Last reply by CreatorMoon, over 4 years ago:
After adjusting a few things (and removing the "+2" after myHeight in line 11) your method worked perfectly! Thanks danpost and RcCookie :D I'm having an issue with another part of the game, but I'll make a separate discussion for it.
How to reference a variable define in world to other class
By Jemy2, with 2 replies.
Last reply by Jemy2, over 4 years ago:
Super_Hippo wrote...
It is private and static. Private means that you can’t directly access if from outside the class. Static means that it is a variable for the class and there is not an individual variable for each object of the class. The name of the variable suggests that it would be a final variable which is only defined once and never changed, but it doesn’t have the keyword. To access the variable from somewhere else in its current form, you need a public method in the same class – often called a “getter”-method. <Code Omitted>
How to Make Object Blink When It Collides With Another Object?
By 27WhiteLighters, with 4 replies.
Last reply by 27WhiteLighters, over 4 years ago:
Risen wrote...
27WhiteLighters wrote...
@Risen The code you posted does not work, because under line 27, Greenfoot gets an error saying "cannot have 'else' without 'if' or something like that. Sorry I could not reply, my power went out, but thanks for trying! You actually gave me a few ideas, but I'm still open to suggestions.
Sorry, my fault. Swap lines 25 and 26
Yes, It works now! Thanks! Again, my power turned off again hence the late response..
Error Message on Published Game
By ItzLukeStorm, with 4 replies.
Last reply by ItzLukeStorm, over 4 years ago:
Ok, thanks
Getting random choice without repetition
By Roshan123, with 2 replies.
Last reply by Roshan123, over 4 years ago:
danpost wrote...
Basically: <Code Omitted>
Got it!!! Thanks for
Java Professional
By adnanatif, with no replies.
Is anyone willing to be commissioned to create a digger game similar to pacman? Karas world. If anyone is actually serious message me
Setting up Greenfoot in IntelliJ
By Game/maniac, with 2 replies.
Last reply by Game/maniac, over 4 years ago:
WE'VE FINALLY FIGURED IT OUT! Documentation coming soon...
Remove Object atWorldEdge()
By Gallier, with 4 replies.
Last reply by Gallier, over 4 years ago:
I got it. I dont write it in the act() command :(
improvements for movement code; how to fix if you keep hold space you dont fall down
By PetrusderEchte, with 1 reply.
Replied to by RcCookie, over 4 years ago:
You may want to specify
how
you want your code to be improved. Here are some semantic and naming convetion like improvements:
In
Spielwelt
, both zellenGroesse and backgroundMusic and in
Jumper2
GRAVITY are never changed and not instance-dependent. Therefore, Both of them may take the modifiers <Code Omitted>As they are static and final, you should name them in upper case only, so
zellenGroesse
->
ZELLEN_GROESSE
.
In
Jumper2
, all variable names and classs names are in english. In
Spielwelt
ho
72
73
74
75
76
77
78
X