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 snake won't move anymore
By vaal, with 1 reply.
Replied to by danpost, about 8 years ago:
vaal wrote...
My snake won't move anymore << Code Omitted >>
Line 60 will never be true. You set the
count
field to zero at line 19 while declaring the variable, which exists only for the current execution of the method. Line 74 tries to add a fractional amount to the
count
field which is declared to hold an integer value, so only 2 will be added there. Since the
Diamondseaten
field is set to zero at line 21 and
count
is incremented to 1 at line 70, and since
speed
is set to 20 at line 81,
count
will never be
speed
at line 83. You
Object deleting itself after reaching edge of World
By dr_shu2, with 3 replies.
Last reply by dr_shu2, about 8 years ago:
Thank you both for your support! I'm good to go now :)
How do I change the direction my character is facing?
By tosteck, with 2 replies.
Last reply by Agent40, about 8 years ago:
danpost wrote...
tosteck wrote...
How do I change the direction my character is facing? In the image I have, the character is facing the left. I want to make my character face the right when he is moving to the right.
Make a copy of the image and use a "mirror" method on the new GreenfootImage object.
Or he could just Mirror every image separately using something like Photoshop or Paint.net and then have two separate images for each direction.
Greenfoot freezes when saving the world (Mac)
By tosteck, with 10 replies.
Last reply by tosteck, about 8 years ago:
I uploaded my scenario to test it on the web and it works fine. :/
how do you make music loop again and again?
By 1234567guy, with 1 reply.
Replied to by danpost, about 8 years ago:
1234567guy wrote...
how do you make music loop again and again?
Take a look at what methods are available in the GreenfootSound class. Or, note line 50
here
.
Is it possible to control a whole game sound volume by a code?
By akael888, with 2 replies.
Last reply by danpost, about 8 years ago:
An interesting way to handle sound is with a class like the following:
Is it possible to get the image set by the UI
By MrBradley, with 3 replies.
Last reply by danpost, over 8 years ago:
MrBradley wrote...
After a bit of investigation: you can get the name of the image file (3.1.0) from calling the toString() method.
True. Note however: (1) you will have to get it before changing the image set to the actor; and (2) it is not the only thing in the String object returned (it contains not only the name, but the full url path of the file and where in memory the image is stored). If you want the name by itself, you will need to extract that portion of it it from the string.
how can i get my score from another actor
By roonie01, with 52 replies.
Last reply by danpost, over 8 years ago:
roonie01 wrote...
I have one small problem my zombie actors animation is supposed to change when he heads left to the left images in my 2d array
The relevant code in your Zombie class act method follows: <Code Omitted>Now, see what happens to the value of
actCount
. First, it starts at zero and throughout is only ever reset to zero (it is never set to a negativ
Why am I getting an error?
By Lukaas, with 30 replies.
Last reply by danpost, over 8 years ago:
Now that you made look search for it, I find you are having the gardener, which is controlled by the player, add a snowman into the world. Remove what you added in your GreeneryWorld class as far as adding a snowman and change this line in the Gardener class: <Code Omitted>to this: <Code Omitted>
Importing images/making new ones
By Samwcool, with no replies.
The default picture editor on greenfoot is paint i want to change this to drawplus so i can make better images does anyone know how to do this?
I want my balloon to eat my soccer player whats the coding?
By Hanpan21, with 2 replies.
Last reply by Yehuda, over 8 years ago:
Are you asking because when you tried it, it did not work? If that is the case you will have to give more information.
Pending downtime for greenfoot.org
By davmac, with 2 replies.
Last reply by davmac, over 8 years ago:
Reminder that the website will be unavailable tomorrow!
Error at Object although not existing
By fabipfolix, with 2 replies.
Last reply by fabipfolix, over 8 years ago:
danpost wrote...
Add else to the beginning of line 37. Removing an object from the world does not make an object non-existent. Just means it is not in a world any more.
Thank you, now it's working
Search bar in website not working- PLEASE HELP
By Venbha, with 1 reply.
Replied to by davmac, over 8 years ago:
It should be working now.
Not Found Compile Button
By sh.mokarami, with 2 replies.
Last reply by sh.mokarami, over 8 years ago:
Thanl you, you're right :D
249
250
251
252
253
254
255
X