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
Need help with creating cheat code
By BBurgerC7, with 2 replies.
Last reply by BBurgerC7, about 9 years ago:
Super_Hippo wrote...
Try to use <Code Omitted>
Haha it worked perfectly, I feel bad for making this thread now
How to flip a card using stride on greenfoot
By Starlord, with 1 reply.
Replied to by Super_Hippo, about 9 years ago:
I've never used stride, but in "normal code" I would say you have to do the following things: a card class - a variable in the class which will be the same for a pair and different to the others - a getter method for this variable - a method to flip the card (change image) a world class - check if a click is made on a card (in the act method). flip the card (call the flipping method on the card) and save a reference to the flipped card. When a second one is clicked, compare the variable in the saved (first clicked) card to the variable in the just (second) clicked card. If they do no
Function Stopped
By MayconRick, with 1 reply.
Replied to by danpost, about 9 years ago:
MayconRick wrote...
The game ends when the shots hit zero, displaying a "game end you missed" message and your score.
Something like: <Code Omitted>where 'showGameOver' may or may not remove all Actor object from the world and then creates the message with the score on an image which is somehow displayed (either using an Actor object or using the World background image).
"If" loops
By FeVo, with 9 replies.
Last reply by FeVo, about 9 years ago:
Thanks @Yehuda
Collision Checking
By MichaelMac, with 1 reply.
Replied to by Yehuda, about 9 years ago:
Greenfoot has a method that creates a list of all the intersecting instances of the specified class. To cycle through all the intersecting instances of Block.class you would use the following: <Code Omitted>With the above code you can do something if there is a block at the specified coordinates.
Getting an object to move smoothly with a single key press
By geckert, with 1 reply.
Replied to by Yehuda, about 9 years ago:
Maybe
this discussion
can help.
constructor doctor in class doctor cannot be applied to given types
By divinity, with 2 replies.
Last reply by divinity, about 9 years ago:
thank you very much Super_Hippo what you have suggested to do, it work, thanks sssssssoooooo much. it is well appreciated, now all I have to do is the connected the administrative class to the gui.
Hiding Methods from GF
By MrBradley, with 4 replies.
Last reply by danpost, about 9 years ago:
MrBradley wrote...
Dan, what version on GF are you using?
I still using GF 2.3.0 USB stand-alone.
How to convert an int into an array containing its digits?
By Super_Hippo, with 9 replies.
Last reply by davmac, about 9 years ago:
Just one small question: where is the -48 coming from?
Incidentally, you can replace -48 with -'0' and it works well, as well as being perhaps a little less cryptic: <Code Omitted>
image change on key press
By AAA355, with 1 reply.
Replied to by Super_Hippo, about 9 years ago:
Try to use the setRotation method and then move(5) for every direction.
Need an easy int for my racing game
By john132, with 2 replies.
Last reply by Yehuda, about 9 years ago:
An integer is just a whole number so an easy int would be 1. What I'm basically asking is What is your question?
Move Object around another Object
By JeanRabelo75, with 2 replies.
Last reply by JeanRabelo75, about 9 years ago:
Thanks a lot! It Works!
Help for Game: Images
By spnjh, with 5 replies.
Last reply by danpost, about 9 years ago:
As far as the given method: First, the image belongs to an instance of the class, so it cannot be a static method. Secondly, if the method returns an image, then why would you say it returns an int value (int should be GreenfoottImage). But, the method is already a part of the Actor class; you do not need to create, or re-create, it. In general: If the images are to be given to Food objects, then the fields should be located in the Food class and the Food class constructor should set one of the images to the created instances. The images can be put in an array to give each an index val
How do I get two shooters working at once?
By frankiegc28, with 4 replies.
Last reply by frankiegc28, about 9 years ago:
Thank You!
Random Moving // Get Random number
By FeVo, with 2 replies.
Last reply by FeVo, about 9 years ago:
Super_Hippo wrote...
<Code Omitted> Or just: <Code Omitted>
Thanks, works perfect
339
340
341
342
343
344
345
X