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
Need to access attributes of superclass from subclass
By GrucifyMe, with 1 reply.
Replied to by danpost, about 6 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, about 6 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, about 6 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, about 6 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, about 6 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, about 6 years ago:
Thank you.
Start screen
By teesore, with 1 reply.
Replied to by danpost, about 6 years ago:
<Code Omitted>
Random number generator influencing "isKeyDown"
By NotGoodAtThis, with 3 replies.
Last reply by danpost, about 6 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, about 6 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, about 6 years ago:
bangtan wrote...
what code should I use if the retry actor was clicked and then it will reset the world
<Code Omitted>???
Sound Effect problem
By CieloMungcal, with 1 reply.
Replied to by danpost, about 6 years ago:
CieloMungcal wrote...
i placed a sound effect when an actor does an act and the sound seems to be playing over and over again while the actor is doin that act. i only need it to play once. for example when i shoot the sound wont stop until the shot disappears from the world
Instead of using
Greenfoot.playSound
, maintain a
GreenfootSound
object and
play
it when needed.
how do I check if an actor still exists
By bangtan, with 9 replies.
Last reply by bangtan, about 6 years ago:
thank you!!
Timer
By teesore, with 1 reply.
Replied to by danpost, about 6 years ago:
teesore wrote...
How can I set up a timer? Gimme the code pls thank you
Please refer to my
Value Display Tutorial
scenario..
program error idk how to fix HELP DANPOST!!!
By CieloMungcal, with 10 replies.
Last reply by danpost, about 6 years ago:
Did you correct my error on line 6 above where comma should be a dot before
getY
? Show entire class codes. --- OH ... and please use code tags.
138
139
140
141
142
143
144
X