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
Making Coordinates
By kiarocks, with 11 replies.
Last reply by kiarocks, over 13 years ago:
I think ill use davmac's idea. @danpost, you remember that scenario you downloaded to take a look at the code? It's that scenario.
Beginner, and need your help
By antoun2011, with 4 replies.
Last reply by antoun2011, over 13 years ago:
Yeah that was it, I opened from a read-only. Thank you very much
I need PPT resource
By winnerpig, with 3 replies.
Last reply by winnerpig, over 13 years ago:
Yes,I am. I've joined greenroom yet,but it seems only be some demos there , and I dont know how to use those cases to my class.
Help!array question
By janjan01, with 1 reply.
Replied to by janjan01, over 13 years ago:
I have solved the question but i got a new question how can i get a signal that if the import file by scanner does not exist or the content in the file is not in correct order/format. i do not mean the immediate window will give out warnings but i want a method that will return boolean when the above error occur or not.
Greenfoot.isKeyDown
By bourne, with 3 replies.
Last reply by bourne, over 13 years ago:
Thanks davmac.
Collision Detecting
By ChrisIsOsmer, with 5 replies.
Last reply by kiarocks, over 13 years ago:
10 cells up from the actor you call it from
decimal (double) rotations of actors
By theguywholikeslinux, with no replies.
It would be really great if I could rotate my actors by not just 360 degrees but decimal values aswell, eg 287.47°. I find it especially useful for large actors in high-rez worlds where 1 degree can be the difference of 10px at each end! I often find myself storing my rotation as a double and then having to cast it to an int each time I want to adjust it but still store the full precision double separately.
One More Question..
By 2woodsway, with 2 replies.
Last reply by Builderboy2005, over 13 years ago:
You made a void method, the fact that it is returning nothing is a good thing :D Did you mean to say perhaps that nothing is being printed out?
Help Quick Question
By 2woodsway, with 3 replies.
Last reply by 2woodsway, over 13 years ago:
very true!! thanks so much
I am lost I am supposed to Write an interface named 'Test' with the following behavior:
By 2woodsway, with 1 reply.
Replied to by mjrb4, over 13 years ago:
Well: - The interface isn't called Test, it's called PointingDevice - It doesn't have a getDuration() method - It doesn't have a check() method - It doesn't have a getScore() method ...I'm not sure there's a lot to go on to help you there!
Making Variable names
By kiarocks, with 14 replies.
Last reply by actinium, over 13 years ago:
Just posted a connect 4 in progress scenarios that uses buttons the way you want, i put the code up , the squares on the board are effectively buttons. The buttons light up when the mouse moves over a particular legal square and when you click on a particular square a coin is placed in the square.. Note also when you enter a coin the square above that coin becomes active.
Help With Greeps
By carterfootball, with 2 replies.
Last reply by mik, over 13 years ago:
Let me just say again, though: Please don't post full source code here for the Greeps competition. It's a competition that is run regularly in many places, and the whole point is that you do this yourself. If you post all your code here, you are making it too easy for others to just copy your code. So, it's okay to discuss ideas, strategies an options, and to get general help on solving your problems, but please no posts of full source code for this one. Thanks.
Help please
By jmlisowe, with 6 replies.
Last reply by AwesomeNameGuy, over 13 years ago:
Well I was re-reading my origonal post and I guess I could be more clear. Basically, whenever you have a variable that refrences an object, like Actor NewActor; the compilor thinks that NewActor is an Actor Object, and will only allow you to call Actor methods on it. Now, if the method is overridden (like act() for example), the Java Virtual Machine will call the correct act method, (the one from the subclass), so you don't have to worry about the program calling the correct overridden method, but what you can't do is call any methods that Actor doesn't have with that NewActor in your code or
adding walls
By ardwennem2, with 1 reply.
Replied to by danpost, over 13 years ago:
use 'if (getOneObjectAtOffset(0, 10, Wall.class) != null) { return true; } else { return false; }' or just 'return (getOneObjectAtOffset(0, 10, Wall.class) != null);' BTW, walls usually have an X offset, not a Y offset. But if your walls are below your Actor, the above code should work. If they are actually walls located to the right (or left) of the Actor, along the x-coordinate, just adjust the code above.
How-To Obstacle?
By aka_Francis, with 3 replies.
Last reply by mjrb4, over 13 years ago:
This simple scenario I knocked up a while back to demonstrate how to achieve smooth movement with obstacles may help - the source is available there of course. http://www.greenfoot.org/scenarios/524
1029
1030
1031
1032
1033
1034
1035
X