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
Glitchy Actor
By APCSP-6, with no replies.
So, my Waitress Actor is glitching when she moves. How do I stop the actor from glitching?
Pong Score
By Sakura.Waifu, with 1 reply.
Replied to by danpost, over 5 years ago:
Sakura.Waifu wrote...
Hi, I have a problem with my Greenfoot pong game. It is for two players and I want to add a score but do not know how. Can someone please help me? i can not find anything online that helps me.
Please refer to my
Value Display Tutorial
scenario. Probably best to have your world retain the scores rather than the players.
Game over screen
By CieloMungcal, with 1 reply.
Replied to by danpost, over 5 years ago:
CieloMungcal wrote...
how do i make a game over screen?
Usually done by adding a new
World
subclasss.
Creating 'car' that can drive with arrow keys
By whattheheck, with 1 reply.
Replied to by danpost, over 5 years ago:
whattheheck wrote...
I'm trying to make a car object that can drive around my world using the arrow keys for direction. I have the code below, but my car object isn't appearing within the world << Code Omitted >>
You need to use the
addObject
method for any actor to appear in the world.
Need to access attributes of superclass from subclass
By GrucifyMe, with 1 reply.
Replied to by danpost, over 5 years ago:
Laser should NOT extend Player (a laser is not a player). Your line of code should get x and y from player, not from the image of the player.
Need Help- Code will not compile
By emfish15, with 1 reply.
Replied to by danpost, over 5 years ago:
I believe that the first
addObject
line should be: <Code Omitted>
Display text on world from variable on non actor or world class
By whattheheck, with 3 replies.
Last reply by danpost, over 5 years ago:
Move line 12 to line 3.
Customers (Diner Dash)
By APCSP-6, with no replies.
I need to create character to act as the customers for my Diner Dash game, but I can't seem to find any to work anywhere. Is there any way that I could take two actor people from Greenfoot and put them together. Follow-up is there any possible way that I could get them to sit and stand... and move? If that makes sense.
Get An Actor Behind An Image
By APCSP-6, with 1 reply.
Replied to by danpost, over 5 years ago:
Use the following line right after the
super
call in your
World
subclass constructor (using the appropriate class name): <Code Omitted>
NullPointerException when trying to speed up paddle
By CodesForFun, with 13 replies.
Last reply by CodesForFun, over 5 years ago:
I figured it out! When I declared theFog to make it so that I could call Fog from another object, I didn't input <Code Omitted> which returned an error because it was trying to call something that didn't exist!
Increase rate of spawning for enemies
By MoleKingQ, with 2 replies.
Last reply by MoleKingQ, over 5 years ago:
Thank you.
Start screen
By teesore, with 1 reply.
Replied to by danpost, over 5 years ago:
<Code Omitted>
Random number generator influencing "isKeyDown"
By NotGoodAtThis, with 3 replies.
Last reply by danpost, over 5 years ago:
NotGoodAtThis wrote...
I want the output of the generator to be saved as a sting not an integers.
An
int
value can be converted to a
String
representation of that value at any time using
""+intValue
The blankclass will never be in the world. It's just so that both the input indicators and the player can inherit from it.
You still need to create one, nonetheless, for any random values to be generated. Also, nothing prevents two random values being the same.
World Limit
By GrucifyMe, with 2 replies.
Last reply by GrucifyMe, over 5 years ago:
Ok thank you, it worked, all I needed to do was to set the location to the bottom of the 80% of the world. Thanks, Danpost
resetting a game
By bangtan, with 1 reply.
Replied to by danpost, over 5 years ago:
bangtan wrote...
what code should I use if the retry actor was clicked and then it will reset the world
<Code Omitted>???
136
137
138
139
140
141
142
X