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
isTouching() error!!!
By fastslash8, with 2 replies.
Last reply by fastslash8, over 10 years ago:
Whoops, got a little ahead of myself! Actually, the player continues to move even if not touching the path, which is what that code was supposed to detect. Sorry to be a bother, but can anyone help? Thanks!
Mouse Info
By cloudster101, with 9 replies.
Last reply by cloudster101, over 10 years ago:
Thanks now it works :)!
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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 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, over 10 years ago:
Thank you, it works!
Tutorial Help
By StructuredLight, with 3 replies.
Last reply by StructuredLight, over 10 years ago:
Okay thanks I understand it a little better now
Collision detection help
By BobbyBorn2l8, with 12 replies.
Last reply by davmac, over 10 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, over 10 years ago:
Calling 'spawn' in the 'prepare' method will not work as you want. Call it from the 'act' method.
740
741
742
743
744
745
746
X