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
having trouble understanding randomAsteroid()
By lprasgla, with 1 reply.
Replied to by danpost, over 6 years ago:
lprasgla wrote...
why do I have to mention the class in Asteroid.anz++? When I delete "Asteroid" from the line the code works but I get multiple asteroids in the universe. And when it is there, there's only one asteroid. Why is it like this? :)
You will need to show the code about which the method is called and indicate what class that code is in.
Need a little help with turning my image
By JoRt, with 9 replies.
Last reply by danpost, over 6 years ago:
You need to split line 94 up into individual lines so that you can make a reference variable to the new world: <Code Omitted>Now you can add to this to add the actor where it is in "this" world: <Code Omitted>It seems to me like all you really needed to do, instead of creating a whole new world, was to use a field to indicate the level and do things based on its value.
Problems with playing a different sound for different keys
By n1ght5t41xX, with 5 replies.
Last reply by n1ght5t41xX, almost 7 years ago:
//PROBLEM SOLVED I managed to abstract the keys. Thank you all.
Sounds folder will not copy in book scenarios
By rhussainmenorah, with no replies.
I am unable to copy the sounds folders due to permissions in the book scenarios. Other folders seems to copy OK. I am able to copy extracted folder to the shared area but cannot copy it to student folders. Please help. Thank you.
missing buttons under "Share"
By Yogi64, with 1 reply.
Replied to by nccb, almost 7 years ago:
How far can you get in the process? There should be a "Share..." button in the top-right. When you click that button, a window should show with three pictures across the top, which are tabs for the different export options. Is the problem that the window doesn't show, or that it's blank when it does show, or that some of the controls are then disabled or unresponsive?
greenfoot
By UyenTran, with no replies.
3. show the name and the values of the above four variables at the lower left corner of the screen using four lines of text. The sequence of the text follows the sequence shown in the requirement above
Bullet doesn't remove itself at a wall
By SemH., with 2 replies.
Last reply by SemH., almost 7 years ago:
Thanks! It worked :)
Greenfoot.ask showing up before the world
By Kang, with 1 reply.
Replied to by danpost, almost 7 years ago:
Kang wrote...
<< Code Omitted >> What I expect is after pressing enter from the start world, the set up world will show up and do Greenfoot.Ask but what actually happens is when I press enter form the start world, it does greenfoot.ask first then changes to set up world. Any solution for this?
You will probably have to override the
World
act
method in the
PredatorPopulation
class to perform the "ask".
Weird error
By R0b1n, with 1 reply.
Replied to by danpost, almost 7 years ago:
I think lines 5 through 8 in the
gameOver
method need to be put in the following
if
block: <Code Omitted>
Scoreboard not working
By R0b1n, with 1 reply.
Replied to by danpost, almost 7 years ago:
You have stuff inside the
canSee
if
block in the working one that is outside in the not working one.
flip verticle?
By jbiser361, with 7 replies.
Last reply by danpost, almost 7 years ago:
jbiser361 wrote...
<< Code Omitted >> tried that
If you are flipping vertically, then the x value should not change -- just the y's need swapped. Also, your bottom-up values are wrong. The coordinate of the maximum height is one less than the given height. Nonetheless, it would be easier to create a new image of the same size as that which you want to "flip" and do a standard nested loop:
Level 1 problem
By R0b1n, with 2 replies.
Last reply by R0b1n, almost 7 years ago:
thank you :D
Can't Open Greenfoot Projects
By MrMinestrone, with 6 replies.
Last reply by MrMinestrone, almost 7 years ago:
Super_Hippo wrote...
While Greenfoot is not running, open the project.greenfoot file of your project with a text editor and find the lines with
xPosition
and
yPosition
at the bottom. Remove those lines or set the variables to 0.
It worked! Thank you so much.
Back and forth loop for countdowns
By Notted, with 12 replies.
Last reply by Super_Hippo, almost 7 years ago:
I think you should add the bullet in the elseif-block and not in the if-block. There is also no reason to have lines 3-5 executed when they are not needed.
Can't delete projectile when hitting Bricks
By Ni3ls, with 1 reply.
Replied to by danpost, almost 7 years ago:
Ni3ls wrote...
I have a projectile Class Bullet, which should be deleted when it hits anything. I also have a wall that can't be passed through by any object using setLocation(int x, int y) << Code Omitted >> I want to delete the bullet when it "hits" the Bricks, but the Bullet never hits the bricks due to the code above.
Then change what the code above does when a
Brick
object is hit.
I have already tried putting this in my Bricks Class, but it didn't work << Code Omitted >> And I have also tried putting this in Bullet Class, but this didn't work either << Code Omi
205
206
207
208
209
210
211
X