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!array question
By janjan01, with 1 reply.
Replied to by janjan01, about 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, about 13 years ago:
Thanks davmac.
Collision Detecting
By ChrisIsOsmer, with 5 replies.
Last reply by kiarocks, about 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, about 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, about 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, about 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, about 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, about 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, about 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, about 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, about 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
I need help please.
By cphizzlemunizzle, with 20 replies.
Last reply by mjrb4, about 13 years ago:
Royalblue64 wrote...
Is this a real method? isEmpty?
It definitely is!
PicoBoard and Greenfoot
By brian, with 4 replies.
Last reply by mjrb4, about 13 years ago:
There's no error checking in the spec that I can see, so that rules that one out. At this stage unfortunately I'm really not sure, and we can't really fix the problem since we can't reproduce it. If you have any more information though feel free to pass it on.
why not have code auto-completion function?
By winnerpig, with 6 replies.
Last reply by winnerpig, about 13 years ago:
Thanks! I know now!
1028
1029
1030
1031
1032
1033
1034
X