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
How to make a Simple counter
By Gaming_100, with 2 replies.
Last reply by Gaming_100, over 9 years ago:
You are the best! Thanks very much!
Adding health
By Childiish, with 12 replies.
Last reply by Super_Hippo, over 9 years ago:
Use the 'getOneIntersectingObject' for Dolphin and Bullet instead of the 'getOneObjectAtOffset' method. (Look at how I did it with the intersectiion with the Seal.)
How do I make a timer using Constructors? Please help
By IHateMichaelKölling, with 6 replies.
Last reply by Nosson1459, over 9 years ago:
At least its not against something, maybe instead aspiring to be superman he wants to be Super_Hippo.
Need someone to check for logic error
By Asiantree, with 2 replies.
Last reply by danpost, over 9 years ago:
Asiantree wrote...
For some reason, all of my Ants turn into DeadAnts after less than 3 seconds of runtime. Is there a logic error for my badCalorie and goodCalorie good in my Ant act method?
I took note of that
here
.
How to Change background mid game?
By crasnoml101, with 3 replies.
Last reply by danpost, over 9 years ago:
When setting an image to the background, greenfoot creates a new image. That is, using 'getBackground' never returns the same GreenfootImage object that you set to the background -- they
might
be equivalent, but not the same. This is for when the world set its background -- setting the image of an Actor object will set the same image and 'getImage' will return a reference to that image that was set to it. You can, however, make use of the counter for switching backgrounds:
Minesweeper game help
By BrownDwarf, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
I don't think that you should do the mine placement from the act method. You should do the creation of the mines and non-mines fields from the constructor. Why do you have this background class? I would do this: - add the 256 buttons - randomly choose 40 and set a variable in them to true (mine below) - when a button is clicked, show a mine or a number based on the variable and the variable from the neighbors
adding multiple rounds
By AAA355, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
In world Background: <Code Omitted>
getX not working.
By Alex12, with 7 replies.
Last reply by danpost, over 9 years ago:
Alex12 wrote...
Thank you very much. Never considered it could hang together with the speed. Thanks :) Could i try to check for it to be under f.e. 15?
You could check it to under any value; but to be equal to a value, you need to be more careful. You could use 2, 5, 8, 11, 14, 17, or 20.
import of jradiobutton and checkboxes
By divinity, with 6 replies.
Last reply by danpost, over 9 years ago:
divinity wrote...
the bread is the type of bread the user would order whether it is parmaesan bread, honey oats, wheat, teriyaki adn I was trying to add it using the add methods.
That would be a very general description of the bread which has nothing to do with how you are trying to code it. I mean, I now how to make a submarine sandwich and how to order one at Subway. My question was, basically, how (and where) did you declare the variable 'bread' in your code?
Global variable
By alinasomcutean, with 3 replies.
Last reply by alinasomcutean, over 9 years ago:
I need it because i need to move a girl the number of boxes which the die showed. And i want to do this the computer, not the person who plays. And it is repeted until you arrive at 29 from 1. Did you understand?
Help with removing Actors of the same class
By Asiantree, with 21 replies.
Last reply by Super_Hippo, over 9 years ago:
Why can't I jump on a block that created?
By Rex553, with 12 replies.
Last reply by Rex553, over 9 years ago:
Thank you so much!
How to make the gameover screen to appear
By jhc0327, with 10 replies.
Last reply by danpost, over 9 years ago:
I think you need to simplify your code a bit. Using the 'playSound' method, for one thing, does not give you any control over the sound (it will play through without you being able to stop it). You should be creating GreenfootSound objects at the time you will be playing them and assign them to a specific field until a guess is made. A simple act method might be something like this:
images
By adlafforest, with 30 replies.
Last reply by Nosson1459, over 9 years ago:
Super_Hippo wrote...
@Nosson: setPaintOrder will not work I believe because the imageActor is just an Actor, not a new class, so you can't set it as a parameter for the method.
I forgot that the class would be Actor.class.
Anyways, I don't think there will be anything which could hide the actor.
Other Actors.
Object reference
By LeonV, with 17 replies.
Last reply by LeonV, over 9 years ago:
Thank you
368
369
370
371
372
373
374
X