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
hi, I need help
By MATE-USER67, with 1 reply.
Replied to by danpost, about 2 months 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, about 2 months 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, about 2 months 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, about 2 months 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, about 2 months 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, about 2 months ago:
Thanks! I'll try and see how it goes.
Clara world
By killer, with 1 reply.
Replied to by danpost, about 2 months 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, about 2 months 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>
I need help with a code on how I can make an actor (in this case a zombie) fall behind me when I get close to him and when I walk away he doesn't chase me
By ELquenosabena, with 8 replies.
Last reply by ELquenosabena, about 2 months ago:
Thanks for everything
l need help
By track-hunt79, with 5 replies.
Last reply by danpost, about 2 months ago:
track-hunt79 wrote...
oh I understand and excuse me again but I'm new to programming and the code you sent me is placed in the obj class?
No. First part in class of zombie and second part in class of character that picks up coin. "obj" is just a dummy variable name to hold a zombie object.
Shop is not working
By ADAM68801, with 1 reply.
Replied to by danpost, about 2 months ago:
ADAM68801 wrote...
Hi, I have a shop in my game, and I want to click on a actor in shop whitch I want to play with, and then the actor shoud change in the game.
Either use a parameter in your game world constructor to pass which character was chosen or create the world and add the character before setting that world active. I am presuming that the character is not being changed mid-game.
Can Someone help me with this bug?
By Kingrko23, with 1 reply.
Replied to by Spock47, about 2 months ago:
I don't understand what your source code should do, but I can tell that the expression <Code Omitted> is wrong. (and the expression <Code Omitted> can be simplified to <Code Omitted>, which implies that it probably is not what you want it to be, too.) To understand your question, the following infos would be helpful: 1. What is variable "input"? 2. What is the meaning of variable "Scanner.lastNum"? 3. What does "is in the correct order" mean for a scanner? (And what is a scanner?) 4. Presumably, seeing t
How To Import Music?
By Karmatic, with 16 replies.
Last reply by Karmatic, about 2 months ago:
OH MY GOD, My teacher taught me what to do, thank you both for your help and patience, "SHMC.mp3" was a .wav file, so it needed to be written as "SHMC.mp3.wav" Again, thank you for all your help here, and have a wonderful day.
super Mario powerup
By Beebon, with 15 replies.
Last reply by Roshan123, about 2 months ago:
@Spock47, Thanks for it. I really appreciate a lot for the whole explanation
isAtEdge not working
By ADAM68801, with 3 replies.
Last reply by ADAM68801, about 2 months ago:
Thanks, it worked
1
2
3
4
5
6
7
X