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 set paint order for specific objects based on posision of them?
By Entity1037, with 8 replies.
Last reply by Entity1037, over 10 years ago:
Oh, I didn't know you could do that. Thank you!
How to resize Actor
By Lautima, with 6 replies.
Last reply by danpost, over 10 years ago:
Your class should look like this: <Code Omitted>All I did was removed the one duplicate line that was throwing the compiler and adjusted the bracketing.
Making 1 Actor move another Actor
By TotalNoob, with 7 replies.
Last reply by Yogibaer, over 10 years ago:
May be the scenario "PushyMultiLevel" (scenario no 10101) does what you are looking for. Try and see the code.
Help with getObjectsInRange
By Amature, with 7 replies.
Last reply by Amature, over 10 years ago:
Alright thanks, so another problem i have now is that i want to make a kid spawn when i click on a spot on the screen. It should spawn there was the mouse was clicked. Is that possible?
How to create an enemy that can take multiple hits
By MontclairState, with 16 replies.
Last reply by Super_Hippo, over 10 years ago:
Thank you for the demo. Did I get it right that every "this" in his code is completely useless? Well, maybe except the "...removeObject(this);".
java.lang.NullPointerException help
By kpdanny, with 8 replies.
Last reply by danpost, over 10 years ago:
Yes. <Code Omitted>
How to make an Object bounce off the world left and right?
By Lautima, with 14 replies.
Last reply by danpost, over 10 years ago:
The AI is not that difficult. What you want is this: 'if the robot is moving right and hits the right wall OR if the robot is moving left and hits the left wall, then reverse its direction of movement.' From this, you can see you need a way to determine which direction it is moving. Since it is moving horizontally and only the x coordinate changes, an 'int' instance field, call it 'xSpeed', set to some non-zero value is all you would need. Then you can use 'xSpeed' to change to location of the robots, negate its value to change the direction of movement for the robots and check the conditio
Give Image Color
By Sykesfaction, with 3 replies.
Last reply by danpost, over 10 years ago:
The 'setColor' method has only one parameter and it must be of Color type. You are showing three 'int's for the parameters in your 'setColor' method call. You can create a new Color with those color part values with 'new Color(20, 0, 0)' (or 'new java.awt.Color(20, 0, 0)' if you do not 'import java.awt.Color;').
Increase Red Value Pixel
By Westga2016, with 2 replies.
Last reply by Westga2016, over 10 years ago:
That kinda of help Danpost I'm working on an greenfoot slideshow. I was trying to look at your Fractal Slideshow as a aide but i am still lost. i wish there was a way for me to upload the file and so you can tell me what i am doing wrong
java.lang.NullPointerException problem
By Delauras, with 6 replies.
Last reply by Delauras, over 10 years ago:
Thank you that worked fine :)
adding a end message
By chrissy098, with 6 replies.
Last reply by chrissy098, over 10 years ago:
ive not made any classes for the end yet
Returning to the Previous World
By Lethal_Vitamin, with 1 reply.
Replied to by Lethal_Vitamin, over 10 years ago:
Never mind, thank you.
Help with my Pong game?
By bananajc, with 1 reply.
Replied to by danpost, over 10 years ago:
Evidently, 'dx' and 'dy' are the speed values along the x and y coordinates (which is sort of a misnomer, as prefixing by using the letter 'd' would normally indicate a small portion of the value instead of the entire value). The 'int offset' determines where the ball hits the paddle and adjusts the horizontal speed accordingly. I would have used 'dx' for 'offset' and then 'xSpeed' and 'ySpeed' for 'dx' and 'dy'.
World Swappin'
By Lethal_Vitamin, with 2 replies.
Last reply by Lethal_Vitamin, over 10 years ago:
*facepalm*
I need help
By docness14, with 4 replies.
Last reply by danpost, over 10 years ago:
Would not this work:
747
748
749
750
751
752
753
X