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
Game MEnu;
By M.Hussain, with 1 reply.
Replied to by danpost, about 11 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 11 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 11 years ago:
thanks so much danpost, really appreciate the help
Intersecting Object Help
By cellostar47, with 3 replies.
Last reply by cellostar47, about 11 years ago:
IT WORKS! Thanks danpost.
Need help to left click to change world
By ZahDx, with 1 reply.
Replied to by danpost, about 11 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 11 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 11 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 11 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 11 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 11 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.
HELP ME SCORE COUNTER PROBLEM
By sharifahhilwa, with 18 replies.
Last reply by davmac, about 11 years ago:
Just like the exception message says, you are calling a method (
getOneIntersectingObject
) which relies on the actor being in the world, but the actor (Crosser) has been removed from the world. You need to avoid calling
getOneIntersectingObject
after the actor removes itself from the world.
Saving Actor Positions Help!
By pokemunn, with 3 replies.
Last reply by pokemunn, about 11 years ago:
Thanks guys, I'll have a crack at that.
Need help with small bit of code
By pokemunn, with 3 replies.
Last reply by pokemunn, about 11 years ago:
Thanks guys, I ended up using a bit of code from a video tutorial in Mik's Blog. Where the actor detected when it was at the edge of the world (either left or right side) and then when that was true it turned 180. I originally planned to have two 'barriers' at either end which had the same image as the side of the background but this turned out to work just as well. Thanks again for your time. :)
How would I make buttons spawn in the world and play sounds when clicked?
By mobileash66, with 3 replies.
Last reply by davmac, about 11 years ago:
mobileash66, please use 'code' tags when posting code. (Click the link that says "Posting code? read this!" under the text entry area). Your code above looks wrong because it contains: <Code Omitted> ... which creates
italic text
.
cannot find symbol - method hitAZombie(), how do i fix?
By roshiyoshi, with 2 replies.
Last reply by roshiyoshi, about 11 years ago:
thank you so much! I just realised my stupid mistake
652
653
654
655
656
657
658
X