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
Help with jumping, gravity, and cliffs.
By jcboz, with 12 replies.
Last reply by Yehuda, over 9 years ago:
jcboz wrote...
Oh okay, thank you! I wasn't sure why it was doing that haha.
It was doing that because there was an error, now it was fixed so you have to re-(whatever) your image.
nullPointer
By Nosson1459, with 9 replies.
Last reply by Yehuda, over 9 years ago:
danpost wrote...
The second one is a close as you will get. It is similar to the way that the java.lang.Integer class and an int value are related. The Integer class is a wrapper class for int types.
Thanks, now I see that the only thing that the arrays have that's not from Object is 'length'.
Issue with greenfoot.org
By Yehuda, with 17 replies.
Last reply by Yehuda, over 9 years ago:
Yes, thanks (the thumb image works).
loop with pause. /between every loop a like to have a pause for 3 seconds
By t-niftarlake, with 8 replies.
Last reply by Timon, over 9 years ago:
Ou sorry.
non-static method setRotation(int) cannot be referenced from a static context
By 7oel, with 3 replies.
Last reply by 7oel, over 9 years ago:
Thank you
Creating and changing volume bar?
By mjrx7, with 3 replies.
Last reply by danpost, over 9 years ago:
mjrx7 wrote...
Yea, I was reading through a bunch of back and forth posts with other people regarding the mouseClicked and finally realized my mistake of needing an object and not a class. It'd be nice if Greenfoot told you that listing a class is not right as it doesn't flag it as an error, it just makes it not do anything. Enough people have seemed to have made the same mistake.
The following:
Greenfoot class API documentation wrote...
public static boolean mouseClicked(java.lang.Object obj) True if the mouse has been clicked (pressed and released) on the given object. If the parame
Breakout - cant place paddle and blocks
By Phirippu, with 5 replies.
Last reply by danpost, over 9 years ago:
Phirippu wrote...
And how i have to write it then ?
You can start by re-writing your 'fuellen' method. Put the for loops in it to add the blocks into the world.
This page
of the java tutorials shows how to use for loops.
Breakout - Bouncing Ball sticking on the floor and the right side
By Phirippu, with 2 replies.
Last reply by Phirippu, over 9 years ago:
Its is working now!!! Thank you
I need a little (maybe a lot) of help
By Wasupmacuz, with 2 replies.
Last reply by Wasupmacuz, over 9 years ago:
danpost wrote...
Wasupmacuz wrote...
I've been trying to make a rectangle appear as an actor's image
One thing that would make things a lot easier is using the GreenfootImage class instead of using the 'BufferedImage' and 'Graphics2D' classes. As such, the code above can be re-written as follows:
Can you please help identify my code blocks and annotate my coding?
By Hamza_Abdulla03, with 10 replies.
Last reply by rishitandon, over 9 years ago:
hi Hamza
im having problems with this code here!
By S77, with 9 replies.
Last reply by S77, over 9 years ago:
omfg thank you ive spent ages trying to get this to work
Simulating Keyboard Inputs, Using Code?
By MySimpleBox, with 1 reply.
Replied to by danpost, over 9 years ago:
MySimpleBox wrote...
Is there a way to lets say make greenfoot act as if "g" was pressed using the Greenfoot.isKeyDown command. Basically can I simulate a keystroke without actually pressing the key?
There is the java.awt.Robot class that contains methods like 'keyPress(String key)', 'keyRelease(String key)', 'mouseMove(int x, int y)' 'mousePress(int buttons)' and 'mouseRelease(int buttons)'. Maybe you could use it.
Help with animating an actor
By jcboz, with 12 replies.
Last reply by jcboz, over 9 years ago:
Thank you guys both very much! Adding the else statement at the begginging of line 29 fixed the issue. I appreciate the help.
Is it ok for me to embed videos from the greenfoot channel?
By csarkar001, with 1 reply.
Replied to by danpost, over 9 years ago:
Since this has not been responded to, I would suggest sending an email to: support@greenfoot.org
How to get a character to move with another moving platform
By sinlessclown, with 20 replies.
Last reply by danpost, over 9 years ago:
Yehuda wrote...
@danpost Why do you need the '- 1' on line 14? (You seem to have a lot of trailing spaces on your lines of code.)
I copied and modified the previous code given (as far as trailing spaces are concerned). The '-1' is not absolutely necessary, but will prevent the last column of pixels in the image of the player from being off the right edge of the world.
363
364
365
366
367
368
369
X