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
i need held with my code
By truck_hunt97, with 1 reply.
Replied to by Spock47, about 6 hours ago:
You can use an attribute for the speed and increase it when the ball is touched. And wherever you move, you use the speed attribute: <Code Omitted>
I need help, to put a "Game over" screen or an animation that says game over in greenfoot
By MR.UWU, with 27 replies.
Last reply by MR.UWU, about 10 hours ago:
What I have to say is that when I give it pley in my menu, it looks like the road moves slowly, and when some time goes by, it goes fast, it is the same as the rivals that I have since the rivals after passing twice in the world they increase the speed is what I want the road to do
I need help with some code
By nedenatt, with 1 reply.
Replied to by danpost, 4 days ago:
Use
Actor
type objects to display clickable text. Use
World
objects for different screens (probably).
jump n run please help
By jerno, with 1 reply.
Replied to by danpost, 4 days ago:
Need codes for
Robby2
constructor and for
randonSpawn
method.
Ball being launched in a certain direction
By Gengar360, with 1 reply.
Replied to by Spock47, 5 days ago:
It seems that "this.paddle" is null. Therefore: 1. Please give the source code where the constructor is called (new Ball(..., ...)). (if the first parameter is null, we found the problem) 2. Please change the line "public Paddle paddle;" to "private final Paddle paddle;". This ensures that the constructor is the only place "this.paddle" is set (otherwise one would have to check whether paddle gets changed somewhere else in the source code).
Boolean Turning Off by Itself
By LegoAJ, with 1 reply.
Replied to by LegoAJ, 6 days ago:
Never mind, I figured it out.
Card Matching Game
By vinxl, with 2 replies.
Last reply by vinxl, 7 days ago:
sorry to say I decided not to submit anything and fail my course. I just lost interest in programming :<
hi, I need help
By MATE-USER67, with 1 reply.
Replied to by danpost, 7 days ago:
MATE-USER67 wrote...
I need a code that when a character touches a potion he can increase his speed and another that doubles the score when you pick up a coin THANKS advance
Add instance fields to the class of the character to signify that (1) potion was touched; and (2) coin was picked up. Use them to control the behavior of the character in the
act
method. Attempt some codes and if you run into trouble, show codes attempted for assistance.
i need help i new progamming
By sares97, with 1 reply.
Replied to by danpost, 8 days ago:
sares97 wrote...
I need a code so that when a policeman collides with a coin he can create a temporary stun effect on enemies. I'm new to programming and thanks in advance.
Try the following field in your MyWorld class (or your game world class): <Code Omitted>with the following line in your MyWorld constructor block: <Code Omitted>and the following in your MyWorld
act
method: <Code Omitted> Then when policeman collides with coin, set the field to some positive value -- 60 units per second of stu
How does ask() method stops the scenario
By Roshan123, with 8 replies.
Last reply by Roshan123, 9 days ago:
danpost wrote...
It doesn't. Line 49 prevents the loop from being infinite. When the "enter" key is pressed, execution "breaks" out of the loop.
Oh, okay and thanks a lot for the explanation and all
Changing Images and Properties of an Object
By Mauckenweg, with 6 replies.
Last reply by Mauckenweg, 9 days ago:
Thank you SO much it works perfectly
Problem with adding double to double
By Turbo_Thorsten, with 3 replies.
Last reply by Turbo_Thorsten, 9 days ago:
Thank yall for the answers. I got an easy solution but the explanation is very helpful :)
Cannot convert to HTML5: Error: Running TeaVM
By Ben_Jiang, with 2 replies.
Last reply by Ben_Jiang, 9 days ago:
Thanks! I'll try and see how it goes.
Clara world
By killer, with 1 reply.
Replied to by danpost, 10 days ago:
killer wrote...
i'm looking help for clara world Baking cake practical.
Please elaborate
in detail
and show any attempted codes.
Wait function
By HAHAHAHAA, with 1 reply.
Replied to by danpost, 10 days ago:
HAHAHAHAA wrote...
I have a game, where if I click the up key, I want the actor to stop moving, hen after one one second, I want the whole game to stop.
Do not use the
wait
method within greenfoot. It is a thread operation and may mess up the execution of greenfoot itself. Use: <Code Omitted>
1
2
3
4
X