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
Reflecting off of objects(bounce)
By Repsidy, with 3 replies.
Last reply by Repsidy, over 11 years ago:
Line 9 was just a test to see if the objects were actually intersecting *as you pointed out and as I found out they were not* I found a different way of working with it though. Though this way is not point sensitive, it did what i needed it to do.
How to publish a code?
By Araxis, with 2 replies.
Last reply by Araxis, over 11 years ago:
*facepalm* So I ' wearing glasses already and still blind ^^ Thank you very much :)
Not sure how to make delays for shooting bullets
By Neymar.Jr, with 10 replies.
Last reply by davmac, over 11 years ago:
@davmac, i always use a double there and it works, as far as i can remember a long should work too, but thats his decision
Well, System.currentTimeMillis() returns a
long
not a
double
, furthermore, a
double
does not have enough precision to represent all possible
long
values. Finally, using a long is more efficient because it avoids the need for conversion between long and double.
How to make an object not move if it touches another object? (Beginner)
By name68, with 7 replies.
Last reply by name68, over 11 years ago:
Thank you much! You did help me really much.
How to get one actor's position from other actor??
By Rishav_Agarwal, with 5 replies.
Last reply by Rishav_Agarwal, over 11 years ago:
Thank you very much danpost!!!
stop shooting when move
By Al7amed, with 3 replies.
Last reply by danpost, over 11 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 11 years ago:
oh ok
Wanting the code to give my enemies health
By Neymar.Jr, with 4 replies.
Last reply by Neymar.Jr, over 11 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 11 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 11 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 11 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 11 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 11 years ago:
thank you !!! :)
Platform problems... yeah. I'm newbie.
By KuroGuroChan, with 4 replies.
Last reply by danpost, over 11 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.
701
702
703
704
705
706
707
X