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 need Help adding time to a countdown clock
By Can'tComplain, with 1 reply.
Replied to by Super_Hippo, about 12 years ago:
In the object that you can click, you put this in the 'act' method: <Code Omitted>With 'clock' as the reference to the clock object. Maybe you save the reference in the world. Then you need to use this reference. In this case, the 'Clock' class needs to have a method called 'add'. Try it yourself as far as you can and then tell us with what exactly you need help.
Is it possible to make a text based game on greenfoot?
By Jakslater96, with 4 replies.
Last reply by Jakslater96, about 12 years ago:
Okay thankyou ill start from scratch
Adding a tag through 'Edit Scenario' doens't work
By Super_Hippo, with 3 replies.
Last reply by Super_Hippo, about 12 years ago:
Alright. I just found it out by chance. Btw, @davmac, did you see this thread? I hoped for an official statement there :) http://www.greenfoot.org/topics/find/44287
java.lang.ArrayIndexOutOfBoundsException
By Spock, with 11 replies.
Last reply by danpost, about 12 years ago:
@Spock, to possibly save time in resolving problems, from now on, please show the entire error message using copy/paste operations. Showing the trace thread with the error message would have pointed us to exactly what was going on immediately (instead of searching through the code to find what might be wrong). In fact something as simple as the index '580' (or whatever) at the end of the error message might have helped in itself; but, still, the more information you give, the better.
Calling score value
By Spock, with 7 replies.
Last reply by Spock, about 12 years ago:
Thanks for that :)
Game MEnu;
By M.Hussain, with 1 reply.
Replied to by danpost, about 12 years ago:
Break the 'menu' down into simple parts that you can work with. For example, a menu has the following: (a) a background -- with possible texts and/or images; and (b) buttons -- actors that perform specific functions when clicked The menu background can be a world canvas or it can be an actor that is added behind the buttons. I have found that it is easiest the create a separate world for the menus. Having a separate world for the menu keeps it separate from your main world (no need to track objects that need removed due to the menu) and it keeps your main world from running while the
cant find variable myWorld, im trying to add a game over screen
By roshiyoshi, with 3 replies.
Last reply by danpost, about 12 years ago:
roshiyoshi wrote...
thank you, why does the "game over" pop up as soon as i press run rather than when the fish is eaten?
Insufficient data to ascertain. You need to show the block of code that the block given above is enclosed within or, if the block given is the complete code for a method, the block of code that contains the call to this method.
method AddMushrooms in class Background cannot be applied to given types: etc... help please
By roshiyoshi, with 10 replies.
Last reply by roshiyoshi, about 12 years ago:
thanks so much danpost, really appreciate the help
Intersecting Object Help
By cellostar47, with 3 replies.
Last reply by cellostar47, about 12 years ago:
IT WORKS! Thanks danpost.
Need help to left click to change world
By ZahDx, with 1 reply.
Replied to by danpost, about 12 years ago:
I think you need to review the methods provided in the
Greenfoot class documentation
and choose a more appropriate method (other than 'isKeyDown').
Platform Problems щ(ಥДಥщ)
By awent0428, with 4 replies.
Last reply by danpost, about 12 years ago:
I do not see any attempt at coding any collision. What have your tried? Things I have noticed: * class names should begin with uppercase characters (by convention) * method names should begin with lowercase characters (by convention) * the setting of the images for your cat, as coded, need to be read from file to create the image and then set every act method the cat moves; this is far from efficient and may cause lag; it would be far better to hold the images in fields and set the cat to the appropriate image only when a change in direction is detected. This means you would need three
Problem with intersecting objects
By K_wow, with 11 replies.
Last reply by K_wow, about 12 years ago:
davmac wrote...
Ah. Have looked at a bit more. The problem is that you have moved your arm back to its "bodyside" position before you check for the collision. Because you have moved it right in to it's controlliing player's body, it's no longer intersecting with the other player. After doing the collision check, you move the arm to wherever it should be. You should check for collision after the arm has reached the correct position, instead. So: <Code Omitted> should be:
Issue with smoothly rotating towards a target rotation
By K_wow, with 13 replies.
Last reply by K_wow, about 12 years ago:
Nevermind, I fixed it. I was supposed to check whether rotationDiff was greater than 0, not less than 180. Thanks for all the help guys! :D
Typing Game
By Spock, with 7 replies.
Last reply by Spock, about 12 years ago:
Thanks Hippo, that did the trick :)
How do you display the "x" and "y" of an actor?
By ILOVELABRADORS, with 9 replies.
Last reply by davmac, about 12 years ago:
To call a method that's in the same class, you write the name of the method followed by parentheses containing the parameter values, if any. As 'updateCoords' doesn't have any parameters you can leave the parentheses empty in this case. If you don't understand something I've said, then please ask about it specifically. Writing a method call is so fundamental that you need to learn to do it yourself, so I'm not going to write it for you.
654
655
656
657
658
659
660
X