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
I am working on the marbles game from book-scenarios chapter 10, i need a menu screen
By Cambodude12345, with 1 reply.
Replied to by danpost, almost 13 years ago:
You can use the 'started' method to add the MainMenu and buttons into the world. You may or may not need to have some 'act' methods (or parts of them) run only on the condition that no MainMenu object exists in the world. Making the image of the MainMenu as large as your world will prevent unwanted mouse actions on objects in your world. Use the 'setPaintOrder' method to ensure the buttons are on top, followed by the MainMenu object.
How to import a subclass.
By awesomepaulj@gmail.com, with 4 replies.
Last reply by erdelf, almost 13 years ago:
yeah, thats true, i dont really know why he would want this
On 'Tower of Hanoi' puzzle algorithm
By danpost, with 12 replies.
Last reply by danpost, almost 13 years ago:
I simplified the algorithm to this : 1. Number the disks from 1 (the smallest) to n (the largest) 2. On any move, the disk to move is the first power of 2 (starting from the highest -- '2^(n-1)') that evenly go into the current move number. 3. Move all even numbered disks one way and odd numbered disks the other (clockwise or counter-clockwise). Believe it or not, rule 3, here, will not break any of the rules 3, 4, or 5 of my previous rules.
moving actors
By timotkica, with 1 reply.
Replied to by danpost, almost 13 years ago:
You either are not asking what you are trying to ask in a way that is understandable, or you are confused. The 'atWorldEdge' method cannot be used to move objects. All it does is return a true/false value that can be used as a condition within an 'if' statement. The only Actor class methods that can be used to reposition an actor object in the world are 'move(int)' and 'setLocation(int, int)'. If you are asking, how to use the 'atWorldEdge' method in determining when to do some action (which could include turning and/or moving that actor):
World not loading due to memory issues??
By RUMMAKER, with 4 replies.
Last reply by Super_Hippo, almost 13 years ago:
When I open your scenario in Greenfoot, then it sometimes work and sometimes it does not. I changed line 03 and 04 to "private ...", but not sure, if this is the solution.
Keeping track of a class that is not extending me?
By forteddyt, with 8 replies.
Last reply by forteddyt, almost 13 years ago:
Got it! Thank you both for your help, I really appreciate it.
Scrolling left and right (ill deal with up and down some other time)
By Mimagic, with 4 replies.
Last reply by Mimagic, almost 13 years ago:
Thank you so much!!!
Actor sets variable of a world he is not in
By S_Felix, with 19 replies.
Last reply by danpost, almost 13 years ago:
Actually, you do not need both constructors in the 'welt' class; just the one that begins with 'public welt(int img)'. You need to right-click on the Game icon and select 'new Game()' to make that the starting world.
Background Scroll
By GaspTW, with 27 replies.
Last reply by GaspTW, almost 13 years ago:
It was indeed the size of the background image, I reduced it and works fine now, at least way better. I have another problem now. I use a collision code on this website for transparency pictures so it my actor collides with other actors as soon as a pixel hits. With other words, the code avoids the transparency, so the collision is pixel perfect. My question is, why is it not working. The code itself works perfectly fine in my actor Boat. When it hits a wall it collides as soon as het hits it, not in the transparent border surrounding it. BUT, this code only works in level 1. As soon
Variables between world and actor
By groep5, with 2 replies.
Last reply by groep5, almost 13 years ago:
Thank you, it works!
Tutorial Help
By StructuredLight, with 3 replies.
Last reply by StructuredLight, almost 13 years ago:
Okay thanks I understand it a little better now
Collision detection help
By BobbyBorn2l8, with 12 replies.
Last reply by davmac, almost 13 years ago:
If it works, then there's no need for me to see it - good work.
Random spawning my barrel actor
By A\aron91, with 17 replies.
Last reply by danpost, almost 13 years ago:
Calling 'spawn' in the 'prepare' method will not work as you want. Call it from the 'act' method.
Non-Static/Static Conflict
By GeicoCoder, with 1 reply.
Replied to by danpost, almost 13 years ago:
'newBall2' is a non-static method (and cannot be made static). You cannot call that method on the name of the class; you need an object created from that class to call that method on. As I do not know what class you are calling the method on or where, if anywhere, you have a reference to your Paddle2 object, it is impossible to determine how to fix this.
Hill climb racing game HELP PLEASE
By UNDEAD_DC, with 52 replies.
Last reply by UNDEAD_DC, almost 13 years ago:
Hi all, It took me a while but i decided to stop with this project (for now) Reasons for me to stop: Its more work than i expected, MUCH more work, and because we dont have long to make this and i have close to no experience with Greenfoot it would take me to long. (yes i have made some parts but that was all for reasearch with code from others and because this project is for school.... I like school now and really want to learn something and "stealing" other's code without understanding what they do exactly and being unable to "fix" anything when its broken. I actually should say we
753
754
755
756
757
758
759
X