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
trying to make a rythm game like fnf, how could I do that?
By marvin1, with 6 replies.
Last reply by marvin1, almost 3 years ago:
ah alright I will try make some code with this example and then come back to say if it worked just to keep updated
I'm trying to make a random letter generator that displays until you press that letter.
By ROKONDA, with 1 reply.
Replied to by danpost, almost 3 years ago:
ROKONDA wrote...
I'm trying to make a typing game where it gives you a random letter, you press it and it gives you another letter. If you press the wrong letter on your keyboard an actor(let's call it vaccuum) moves forward and the letter that you have to press dosen't change. I would like to make this letter counter show above your main actor( let's call it cat).
What have you tried? Show attempted codes (which should be in subclass of
World
)..
projectiles, collision and basic enemy code
By Dinklberg, with 2 replies.
Last reply by Dinklberg, almost 3 years ago:
alright, i'll check it out. thanks for the help!
language of greenfoot
By ney, with 3 replies.
Last reply by Spock47, almost 3 years ago:
I want to clarify that I posted my response above only minutes after the question was asked (some hours before Super_Hippo's response). However, the post got held back due to checking it for spam (seems that a link to the greenfoot website triggers the spam alarm). That's why there is now an additional answer shown despite Super_Hippo's answer already being completely sufficient. Live long and prosper, Spock47
java.lang.NullPointerException while trying to put objects in different locations
By TIM187, with 1 reply.
Replied to by Super_Hippo, almost 3 years ago:
“getIntersectionObject” returns an intersection actor. If there is no Rightplayer actor intersecting the actor this code is in, it will return null. (Since the two paddles will probably never intersect each other, it will always be null.) The error occurs because you call “setLocation” on null.
My level up board, how do i make it go away
By SportingLife7, with 2 replies.
Last reply by SportingLife7, almost 3 years ago:
Got it! thank you so much! :)
How to jump properly?
By AbdulrazaqAS, with 3 replies.
Last reply by AbdulrazaqAS, almost 3 years ago:
Thank you, I love that Jump and Run game. I will try and follow the your steps to make mine.
How to remove actor from another actor class ?
By greenwood, with 12 replies.
Last reply by danpost, almost 3 years ago:
greenwood wrote...
how to remove the object after it bounces back at another edge of the world ? << Code Omitted >>
It is not a
checkEdge boolean
that you need -- it is a
bounced boolean
. The condition to bounce is when the
boolean
is
false
. Set the
boolean
to
true
when bouncing. Then, remove the actor when the
boolean
is
true
(when at edge). It would be like this:
How can I flip the image of an actor when it turns 180 degrees?
By Rety, with 2 replies.
Last reply by Rety, almost 3 years ago:
It works! Thank you.
"ImageHeight has private access in greenfoot.Actor"
By SilverCS, with 2 replies.
Last reply by SilverCS, almost 3 years ago:
Spock47 wrote...
There is a typo in line 6: at the declaration, imageHeight is upper case, but it has to be lower case: <Code Omitted> Live long and prosper, Spock47
GOOD EYE! THANK YOU, THIS HAS BEEN TRIPPING ME FOR HOURS NOW
need help removing the actor that i click when right clicking over it
By SportingLife7, with 4 replies.
Last reply by SportingLife7, almost 3 years ago:
That works so much better, thank you times a thousand :)
How to reset the rocket's position after level up?
By SportingLife7, with 3 replies.
Last reply by SportingLife7, almost 3 years ago:
Oh I see! Thank you so much! You have no idea how helpful this is! :)
Can't figure it out, healthbar Asteroids
By SportingLife7, with 10 replies.
Last reply by SportingLife7, almost 3 years ago:
Actually, we are all good. Thanks for your help @danpost.
cant set values and actors not showing image
By xixEmilyxix, with 14 replies.
Last reply by danpost, almost 3 years ago:
xixEmilyxix wrote...
the flowers turning up as a green footprint - how would i go about fixing that?
In Flower class, modify the constructor to this (adding line 6): <Code Omitted>
using getObjects with specific index
By nax_s, with 1 reply.
Replied to by Spock47, almost 3 years ago:
Sorry, but your source codes will not work, please completely remove your current source code from Platform and BuyArcher before adding the source code given in this post.
As I understand, you want to click on a platform and after that you want to click on a button ("BuyArcher") and then a tower has to appear on the platform that was clicked earlier. That means that the button somehow needs the information which platform has been clicked. This information has to be stored somewhere, so that it can be used later. Currently, there is nothing that does this in your source code. 1.
43
44
45
46
47
48
49
X