Sign Up, Lost Password
What is happening right now?
The Battle For ...
Final Exam - Sp...
Rabbits Versus ...
How I can add something just for a perioade
By Jennifer1234, with no replies.
Hello everyone! I am trying to make a game . If I am touching an object with another one I want to show three object: an question and 2 possible answers . (I made images with this 3 objects)I succeed on this part , but I want to stop for a while the game (for the player could answer at the question) . And then , I want when i click the good answer to remove the all three object and when i click the bad answer the same things. You can help me,please?
reply to How do I pixelate my background in Greenfoot?
By Zweeg - about 1 hour ago
I don't know how to write the code to pixelate it.
reply to Midterm project - wanting to make a rhythm game of sorts
By Vercility - about 1 hour ago
I'm just gonna asume you know the basics of java else this would be pretty pointless. U can check arrow keys with <Code Omitted> U can turn your actor with <Code Omitted> Movement : <Code Omitted> Changing their speed randomly is a bit more complicated so we'll handle that later Regarding 4 : Are they just supposed to change direction or change which direction they come from? e.g east -> middle to west -> middle or east->South? Regardless, this isn't harder than the previous tasks
My idea is to have some sort of counter that counts up every half or quarter-second, and when it hits certain numbers (it goes up indefinitely) it spawns the arrows? That seems like it would take forever to individually code the counters for the arrows, though.
No. The problem is just that you cant exactly set the counter time because greenfoot has no wait method for seconds, you can just run a while loop that increments an integer and when it hits a certain value you reset it and spawn an arrow (randomly)
Update: froggo eats
By gkinder - about 2 hours ago
eat flys dont get ate by the Alligator
reply to Need help with spamming game
By iminblue - about 5 hours ago
Allow 4 values for the 'ok' field -- namely '0', '1', '2' and '3'. Then you can increment it when a key is detected and increment it again when the key is released. Only move when the value is even. When it is '0' accept one of the keys and when it is '2' accept the other. Increment its value when moving and when the last movement key is released. Set it back to '0' instead of the increment to '4'. The following is the basic idea without your framing and whatever 'nr' does: <Code Omitted>
Thank you so much man it worked ! Appreciate the help ! Have a good day !
Comment on Infinity_Line
By Janny221199 - about 6 hours ago
Can u public this project? its amazing!
Comment on MouseClass
By Busch2207 - about 7 hours ago
Yeah, I sadly remembered after updating and publishing this code... :/
reply to Inserting an array into an array?
By danpost - about 10 hours ago
I figured out a way to do the world without having to set another part of the array. When the character initializes I setup a seperate 5x5x2 array that holds the limits of each "world" in the worldChunkOre variable so that when I need to call a particular worldChunk I don't have to cycle through the entire worldChunkOre array. This is more or less how both arrays look. << Code Omitted >> Does that all sound about right?
Still seems a bit over-complicated. I was thinking that if the ore actors saved their location in the world, then all you would have to do is list the ore objects in a one-dimensional array. Because each world originally has up to 12 ore objects, the first 12 would be for world00, the next 12 for world01, etc. If you have worlds that are 5x5 then the sixth group of 12 would be for world10, and so on. To help save on memory usage, you can set the image of empty veins to 'null'.
New Scenario: A>C>E
By mr.calcantar - about 10 hours ago
New Scenario: The Battle For The Castle
By fred112f - about 11 hours ago
Update: RE zero
By TimesNewRoman - about 13 hours ago
Starting Life in Another World, from Zero
reply to How can you create random maths questions to pop up?
By Yehuda - about 13 hours ago
Also, I see that people use a JOptionPane, but it would be easier to use Greenfoot.ask, and the JOptionPane cannot be converted into HTML 5.