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
stop shooting when move
By Al7amed, with 3 replies.
Last reply by danpost, over 12 years ago:
It is a complete conditional statement and it will regulate the firing of shots the way you want. It is much easier to say when to do something than when not to do something. One more condition will probably need added to it. The condition of the shot delay timer (is it zero); but, that was not part of the main subject matter. If you really want to do it like you tried above, then: <Code Omitted>however, this is awkward with the double-negative.
Problem subtracting health from health bar
By Neymar.Jr, with 11 replies.
Last reply by Neymar.Jr, over 12 years ago:
oh ok
Wanting the code to give my enemies health
By Neymar.Jr, with 4 replies.
Last reply by Neymar.Jr, over 12 years ago:
oh well I'm new here so I wasn't sure.
Main Menu, Game Over, or You Win Classes? Help??
By jlee2014, with 1 reply.
Replied to by danpost, over 12 years ago:
The 'Game Over' and 'You Win' classes can be simple World subclasses. The 'Main Menu' class would be much more involved and would very much depend on how you would want to implement it (the menu).
Setting positions for objects in World
By jlee2014, with 2 replies.
Last reply by jlee2014, over 12 years ago:
Thank you! :) It worked great
How to get more leafs if a wombat ate one? (Beginner)
By name68, with 6 replies.
Last reply by name68, over 12 years ago:
Thank You for Your explanation!
Walking on the platform
By Arthur114, with no replies.
I need a help with my wombat game, he cant walk on the platform and i cant find out why i was trying to use many different codes all he can is ( not to jump on the platform which is about him) but i want to him to jump on the platform and walk on it.. Help me to put something into code so he can walk on the platforms <Code Omitted>
Problems accessing a variable from an instance of a class
By johnmineur, with 4 replies.
Last reply by johnmineur, over 12 years ago:
Hello again... just got back. Thank you very much for everything. You and people like you put so much time into projects like this. I hope I will be able to do the same in the future :)
"Layer" for objects
By sqrt289, with 2 replies.
Last reply by sqrt289, over 12 years ago:
thank you !!! :)
Platform problems... yeah. I'm newbie.
By KuroGuroChan, with 4 replies.
Last reply by danpost, over 12 years ago:
KuroGuroChan wrote...
It works perfectly on top or from above.
Maybe it works too good. Comment out the top and bottom collision code and test it to see how the side collision is working. If it still teleports the character to the top of the platform, then I was wrong and I am sorry.
"Index is big enough" message popping up along with wierd Array Index Out of Bounds Exception?
By Entity1037, with 4 replies.
Last reply by Entity1037, over 12 years ago:
Nevermind. FACEPALM! The message that pops up is a debug message I forgot to delete, and the errors with my program are all my fault. *facepalm* Thank you!
Make a Main Menu
By BD289, with 3 replies.
Last reply by danpost, over 12 years ago:
I did not say to download it. Run the scenario on the site and press the 'm' key for the menu. The two lower buttons labeled 'Maze' and 'Menu' will display the codes for those two classes.
Making objects move in a circular pattern?
By allyand17, with 10 replies.
Last reply by danpost, over 12 years ago:
My method above requires no Maths at all. Grant me this: no matter what location your orbiters start at, they will be a specific radius and a specific angle from the center. These values could be passed to the constructor of the orbiter; or you could call methods in the class to set those values after creating them.
Starfighter code not working
By GamesGrinder1998, with 6 replies.
Last reply by GamesGrinder1998, over 12 years ago:
danpost wrote...
You cannot track anything until you declare the field. In the class, but outside any method, write: <Code Omitted>
thankyou so much, it works now
how do i do powerups
By GamesGrinder1998, with 3 replies.
Last reply by danpost, over 12 years ago:
Creating classes and writing code is not something that will change because you are in greenfoot. If it is Java that is new to you, then maybe you should review the Java tutorial on
Learning the Java language
. You can pick and choose from your weaknesses, and work on those particular pages. In other words, if you are totally unfamiliar with the language itself, 'Language Basics' would be the place to go; if you are not clear on how to create classes and methods, 'Classes and Objects' might be the answer.
703
704
705
706
707
708
709
X