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
character movement
By Nemean, with 1 reply.
Replied to by danpost, almost 13 years ago:
If your actor is only to move 'up' and 'down', then you do not need to use all this code with Math functions and all. Even if you have it as a sub-class of Mover, you do not have to utilize this code. I threw this code together, controlling the direction with the arrow keys
how do i upload games
By ZDZOZ, with 2 replies.
Last reply by danpost, almost 13 years ago:
I guess the button says 'Share' for the first upload and 'Update' for revisions.
location of mouse
By tylers, with 3 replies.
Last reply by bourne, almost 13 years ago:
Or nesting it within the mouse event checks like mouseMoved or mouseDragged. <Code Omitted>
using text files in a game
By stevenGrohe, with 17 replies.
Last reply by stevenGrohe, almost 13 years ago:
okay thanks
Actor not in world?
By Sofalovesmusic, with 2 replies.
Last reply by Sofalovesmusic, almost 13 years ago:
thank you
slow
By tylers, with 2 replies.
Last reply by tylers, almost 13 years ago:
sorted it now but thanks
how do you list objects in a certain radius
By tylers, with 2 replies.
Last reply by tylers, almost 13 years ago:
thanks
UPLOAD
By abrabant, with 8 replies.
Last reply by tylers, almost 13 years ago:
ok thanks. its 365KB well under :)
make my cat sleep
By Tomc84, with 5 replies.
Last reply by danpost, almost 13 years ago:
The 'else' is not neccessary, as any code following the snippet I provided will execute if 'not sleeping'.
how can i change sprites in game on collision
By craigv, with 17 replies.
Last reply by craigv, almost 13 years ago:
yaaaaaaay! finally worked properly :D thanks for your help guys Craig
Keypress issue
By murphys, with 3 replies.
Last reply by Morran, almost 13 years ago:
@nccb that makes lots of sense.
safe spot
By Tomc84, with 1 reply.
Replied to by Morran, almost 13 years ago:
It's possible, yes. I don't really know the context, so I can't say just how to do it, though. You could probably put in some code in the "eaters". When the "eaters" eat, they check to make sure that they are not in a safe zone. You could have the safe zone be its own type of Actor. Choose an image to bound the safe zone. If you do, than the "eaters" could just check <Code Omitted>Since the image is always square shaped, having a round safe zone would take some tinkering.
Download own code
By Aho, with 2 replies.
Last reply by Aho, almost 13 years ago:
Ok.. thanks!
Help with nested if statement
By lex404, with 9 replies.
Last reply by lex404, almost 13 years ago:
thanks! that definitely helped!! im going to go through the code and fix it up with better naming conventions.
Making something stay on the top layer?
By Gazzzah, with 1 reply.
Replied to by nccb, almost 13 years ago:
If they are different classes, you can use the setPaintOrder method of the world: see the docs locally or at http://www.greenfoot.org/files/javadoc/greenfoot/World.html. If they are the same class, there's no mechanism for changing the paint order.
1003
1004
1005
1006
1007
1008
1009
X