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
Numbers keeps increasing
By trevo, with 9 replies.
Last reply by danpost, over 6 years ago:
trevo wrote...
And the numbers represent which target it goes to. I couldn't figure out how to make it stop increasing.
If the target for a projectile is fixed, why did you add lines that change the number?
Saving the world moves objects
By Tietie12, with 8 replies.
Last reply by danpost, over 6 years ago:
Tietie12 wrote...
i know it is possible to continue with this method but it makes it incredibly slow opposed to not having too
Makes what slow -- the running of the scenario or the coding of it?
Greenfoot bug or am I dumb?
By CarolK, with 2 replies.
Last reply by CarolK, over 6 years ago:
Ok, so it was the second option... Thank you! I can not believe I forgot about it
Collecting 3 key, avoiding enemies, and creating a labyrinth
By Jaisdreval, with 1 reply.
Replied to by danpost, over 6 years ago:
This
tutorial page has a section on
Saving the World
, which allows your actors to be immediately initialized.
getWorld().removeObject();
By NotAProYet, with 9 replies.
Last reply by NotAProYet, over 6 years ago:
Many many thanks! It is working just perfectly!
object spawner
By mercury, with 1 reply.
Replied to by danpost, over 6 years ago:
mercury wrote...
I am making a version of asteroids for a project how do I make an object spawner to spawn the asteroids
Your world is an object which can spawn actors into itself. Add an act method to your
World
subclass.
Starting Rotation
By AdiBak, with 3 replies.
Last reply by danpost, over 6 years ago:
@Archerfish, the general equation is: <Code Omitted>I am surprised you missed the "+1" immediately after stating why "121" was used.
need help
By StudyNerd, with 4 replies.
Last reply by StudyNerd, over 6 years ago:
danpost wrote...
In changeHealth method, try changing first line to this: <Code Omitted>
thank you
PowerBar/HealthBar
By LightningFast, with 2 replies.
Last reply by LightningFast, over 6 years ago:
Thank you I'm taking a look at it right now!
image scaling is awful! need help!
By LightningFast, with 5 replies.
Last reply by LightningFast, over 6 years ago:
Sorry for a late reply... I took into consideration what you guys have said and fixed the code! Thank you! Here's the fixed code... import greenfoot.*; import java.util.*; public class Textboxes extends Actor { int t = 0;//counter GreenfootImage textArrays = {new GreenfootImage("RekaText1.png"),new GreenfootImage("RekaText2.png"),new GreenfootImage("RekaText3.png"), new GreenfootImage("RekaText4.png"),new GreenfootImage("RekaText5.png"),new GreenfootImage("RekaText6.png")}; //GreenfootImage array to store images public void act() { picTimer();
Deleting an object if two things are touching in the world class
By StudyNerd, with 4 replies.
Last reply by Super_Hippo, over 6 years ago:
So you want that a new key spawns every five seconds? I think I didn’t understand how collecting or not collecting is affecting the timer. Using a static variable for it seems pretty unnecessary though.
java lang runtime exception
By Manu3lll, with 5 replies.
Last reply by Manu3lll, over 6 years ago:
Thank you very much for you help, it worked.
method doesn't work
By StudyNerd, with 6 replies.
Last reply by StudyNerd, over 6 years ago:
danpost wrote...
StudyNerd wrote...
what do you mean?
Do you see a
HealthBar
object in your world? Is there no change in it -- and that is why you are saying it does not work?
I figured it out. Thank you for your time. You are a legend that replies to all the posts. Dan the man
Score Counter Does Not Work
By JaneSmith, with 15 replies.
Last reply by suzbo, over 6 years ago:
Thank you for all your help
Greenfoot wont tell me what's wrong
By Ran, with 1 reply.
Replied to by danpost, over 6 years ago:
Ran wrote...
Greenfoot ignores any attempt I make to compile a class, thus leaving it unusable, but also refuses to tell me which code isn't working. It shows me nothing as missing an element or not formatted correctly.
Sometimes closing the greenfoot application and restarting it will help.
151
152
153
154
155
156
157
X