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
Randomly pick specific number
By ari21, with 9 replies.
Last reply by danpost, about 8 years ago:
Yehuda wrote...
I think the word "between" in your first post mixed me up.
What clued me in was "between 65
or
75" -- not
and
.
update the height of stacked objects
By spaceleaf, with 3 replies.
Last reply by danpost, about 8 years ago:
I do not know the movement of the actor(s) or what moves them. I do not know how accurate you want to be in the placement of the objects. All I know is you are trying to limit how high the actors stack and, now with your last post, I am presuming that the placed actor is to align horizontally with a Plate object (which it may or may not be touching). Maybe you can give a synopsis of what you want to happen and how -- so any answer given is an informed one.
how to make space for automatic shooting
By kogen, with 1 reply.
Replied to by Super_Hippo, about 8 years ago:
Basic code: <Code Omitted>You will notice that it will constantly shoot when you press space. To avoid that, you need a timer.
Transform isKeyDown to mousePressed
By blblewah, with 1 reply.
Replied to by Super_Hippo, about 8 years ago:
Your condition could be that either the key or the mouse is pressed. Note that pressing the mouse is a little bit different. There is no "isMouseKeyDown" method. You can only check when the mouse changes from one state to another. So when it is pressed and when it is released. But you could check if a mouse press is detected on the button and then check the location of the mouse (if it is still over the button) and if the button was released. If one of that happened, "isMouseKeyDown" would be false.
Getting Rotation
By Bandito, with 2 replies.
Last reply by Bandito, about 8 years ago:
Alright thanks, that worked.
How to make actor appear to world
By gudgurl123, with 1 reply.
Replied to by danpost, about 8 years ago:
What do you have so far for the game over and loose class codes?
How to place objects in order as they are read from a text file
By Dom05, with 14 replies.
Last reply by Super_Hippo, about 8 years ago:
I just threw this together. Not tested or anything. Hope it works and/or helps.
Can I have help flipping my Immage
By Bandito, with 5 replies.
Last reply by Bandito, about 8 years ago:
That worked. Thanks for your help!
How do i add more than one class that can be added into a list?
By Bonobo, with 2 replies.
Last reply by danpost, about 8 years ago:
<Code Omitted>The above is not tested -- but, I believe it should work. Be advised that the elements are typed as Actor objects and, as such, the methods or fields that are declared in either of the two classes are not accessible without first casting any of the objects appropriately as the type they actually are (as a läufer or läufer2 type object; you can use the 'instanceof' conditional to check which class the object belongs to).
I am trying to switch images at a slower pace, but whatever I put in the counter it doesn't work to slow the images down when switching
By mouseofgory, with 2 replies.
Last reply by mouseofgory, about 8 years ago:
Thank you! Such an obvious mistake and I missed it!
Greenfoot low FPS and Speed
By SamuelIS, with 3 replies.
Last reply by danpost, about 8 years ago:
I do not see anything that would seriously cause any lagging. The suggestion Hippo gave to show the constructors of other classes might help. However, showing entire class codes would be more helpful so as to leave no stone left unturned (if you know what I mean).
How to make enemies go from one side to the other
By Toaster, with 7 replies.
Last reply by Super_Hippo, about 8 years ago:
<Code Omitted>
Play gif only once?
By Recorsi, with 2 replies.
Last reply by Recorsi, about 8 years ago:
It works, thank you very much :)
HTML 5 translation Error - maybe Math.hypot?
By Super_Hippo, with 7 replies.
Last reply by Super_Hippo, about 8 years ago:
It does. Thank you!
Eclipse source code problem
By jberrich, with 2 replies.
Last reply by jberrich, about 8 years ago:
this code : <Code Omitted>will be replaced by :
305
306
307
308
309
310
311
X