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
Greenfoot World coordinates
By Pieter, with 2 replies.
Last reply by DonaldDuck, over 13 years ago:
If your world object knew the actors image ( GreenfootImage myActorImage = new GreenfootImage("filename of actors image"); ) you could say addObject(new myActor(), 0+(myActorImage.getWidth()/2), 0+(myActorImage.getHeight()/2)); to make the actor be added in the top left corner, but this gets even more confusing. Just remember that the objects x,y coordinates are the center point of the image.
How to make an object go to an another object
By nooby123, with 4 replies.
Last reply by nooby123, over 13 years ago:
no nevermind i figured it out.
Keep up with the Gallery on Twitter!
By mik, with no replies.
You can now follow Greenfoot Gallery updates on twitter. To stay up to date, follow
GreenfootUpdate
How can I change the Drawing Color of GreenfootImage?
By GameCode, with 2 replies.
Last reply by GameCode, over 13 years ago:
Thank you very much =)
how do you make an object point away from another object?
By nooby123, with 9 replies.
Last reply by DonaldDuck, over 13 years ago:
You cannot call getX() or getY() from the constructor of an object (public ()) Move the code that uses these calls into the act method and you should be good.
Error
By w1llis, with 10 replies.
Last reply by davmac, over 13 years ago:
I can't manage to cause the same error. Probably your laptop has less RAM than mine. Try the things I suggested above.
Problem with the Drawstring method
By w1llis, with 7 replies.
Last reply by DonaldDuck, over 13 years ago:
<Code Omitted>
networked multiplayer games
By jasonwchan, with 1 reply.
Replied to by kiarocks, over 13 years ago:
read this
READ
GetX()
By Advenging, with 11 replies.
Last reply by davmac, over 13 years ago:
And: you
can
access non-public methods / variables from another class if they are in the same "package", as long as they aren't declared private. This is a Java idiom which isn't really represented in Greenfoot; all your classes are in the same package. But you can't call non-public methods from a class in a different package. For instance, there are some methods in the Actor class which are not public and which you can't call. (They're not listed in the API documentation - because you are not meant to be able to call them). Using 'static' works if there is only one object you are in
how to make one object go through one edge and go out the other
By nooby123, with 10 replies.
Last reply by danpost, over 13 years ago:
Thanks, Davin. I'll take a look at it!
How to change a objects class.
By kiarocks, with 2 replies.
Last reply by kiarocks, over 13 years ago:
ok
Where is the Scenario Information in version 210
By dbal, with 1 reply.
Replied to by dbal, over 13 years ago:
One of my students found it on the Scenario menu. Dick Baldwin
Randomly Generated Map
By w1llis, with 8 replies.
Last reply by w1llis, over 13 years ago:
Thanks Wagnerf and DonaldDuck. I'm slowly re-learning Java :)
setBackground method
By ianking, with 10 replies.
Last reply by ianking, over 13 years ago:
Aha - makes sense now thanks. Now to get the rest of the game to work.....
How to use System.out.println()
By kiarocks, with 10 replies.
Last reply by mjrb4, over 13 years ago:
There's a full list here: http://www.java-tips.org/java-se-tips/java.lang/character-escape-codes-in-java.html \n, \\ and \" are the ones you'll most commonly use.
1043
1044
1045
1046
1047
1048
1049
X