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
My project doesn't finish compiling
By DSB, with 3 replies.
Last reply by danpost, over 8 years ago:
DSB wrote...
Thank you. Is there an easy, simple way to turn a png image into a java image?
<Code Omitted>The
getAwtImage
method has been available almost from the beginnings of Greenfoot.
Need help returning int from other class
By Game4Lols, with 3 replies.
Last reply by danpost, over 8 years ago:
Game4Lols wrote...
Basically, I have four "Worlds" that the character can be in, and by walking to the end of the screen, it will change the "world" to a new one by changing the background. I also have the barrel, which I only want to be visible if the player is in the same world as the barrel. The "Worlds" is just top left, bottom right etc. So the int world has a range of 0-3. I want barrel, (Who is given a random world of its own at the start,) to find the players world, and hide if it's world isn't the same.
You are having the barrel constantly check on the condition that the playe
I'm trying to add an object onto my World but it doesn't seem to work. Can someone tell me what I'm doing wrong
By Comp, with 10 replies.
Last reply by danpost, over 8 years ago:
Comp wrote...
A terminal window popped up relaying the message but only a couple of times.
Every time it does work, a new VikingLifeEater object IS placed into your world and should by all rights remove a Life object from the world (provided you are placing them properly in the world).
I’m making a sort of zombie game
By NervousNeep, with 25 replies.
Last reply by NervousNeep, over 8 years ago:
Never mind I got it
i'm trying to make a "tank trouble" game for school
By Sean, with 3 replies.
Last reply by danpost, over 8 years ago:
Sean wrote...
when the tank touches a bullet the program crashes. I also need some help getting the Tanks to fire bullets in the first place. I think i could figure out the shooting part if someone can help me with the bullets hitting the tanks
Show class code for bullet.
Score counter won't work
By Prox276, with 12 replies.
Last reply by Prox276, over 8 years ago:
Ok, thanks a lot!
I'm making a brick breaker game for a school project. I was wondering what code to write for the ball to bounce back in the angle it came off of walls/paddleboard?
By RSekander, with 1 reply.
Replied to by danpost, over 8 years ago:
RSekander wrote...
I am completely lost for the bounceBack method. How do I get it to bounce back of the same angle it came in? << Code Omitted >>
Bouncing off a wall will involve changing horizontal direction while bouncing off a paddle will involve changing vertical direction. That being said, you should split up the conditions into two separate
if
statements.
Is it possible to add two of the same object - sidewalls? It wont show up on the screen.
By RSekander, with 2 replies.
Last reply by RSekander, over 8 years ago:
Thank you, I got it :)
java.lang.NullPointerException
By raging_ewok, with 4 replies.
Last reply by Yehuda, over 8 years ago:
You were not supposed to remove the whole line.
danpost wrote...
Remove the first
Scoreboard
from line 28
Have the following as line 28: <Code Omitted>
How to created a quiz in Greenfoot
By eliass, with 1 reply.
Replied to by Yehuda, over 8 years ago:
What part are you having trouble with? (See
here
.)
How to show a you lose screen at zero points.
By AliZahid28, with 1 reply.
Replied to by Yehuda, over 8 years ago:
More information is necessary to give a detailed explanation for your scenario. Where is the counter variable and where are you trying to access it from? Why do you not just have the game over code in the class that has the counter variable? <Code Omitted>
How to check if actor is touching a certain color
By Zweeg, with 5 replies.
Last reply by danpost, over 8 years ago:
Zweeg wrote...
@danpost could you provide some example code? I'm not quite sure how to use getOneIntersectingObject or how to use it to become useful in this case
Would rather see if a better way is available. But: <Code Omitted>should be how to get going.
How Do I Make My Actor Move Forward?
By Zweeg, with 3 replies.
Last reply by danpost, over 8 years ago:
Zweeg wrote...
do you know how to incorporate the move method into a method that simulates the effects of gravity?
Gravity only affects vertical speed, so using
setLocation
is probably better here. If you want to have the rotation to match the direction of movement, you can set it according to the values of
xVel
and
yVel
. Maybe
this post
can shed some light.
How do I get my character to throw his weapon in an arc? Any Suggestions?
By Comp, with 3 replies.
Last reply by Comp, over 8 years ago:
Thank You!
Running a scenarios on html5
By basar1, with 1 reply.
Replied to by Yehuda, over 8 years ago:
Every scenario that gets uploaded has two versions, the applet version which doesn't work on all browsers (like Google Chrome), and the HTML5 version which should work on all browsers just not all scenarios work (on any browser).
254
255
256
257
258
259
260
X