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
what is wrong wit my code?
By SanjiNaha, with 5 replies.
Last reply by danpost, over 6 years ago:
SanjiNaha wrote...
<< Error Trace Omitted >>
That error was not produced with the code given above. What is your revised code that this came from?
Need help
By N1C0, with 1 reply.
Replied to by danpost, over 6 years ago:
N1C0 wrote...
i want to create two objects with a delay of 5000 in between << Code Omitted >>
Is the entire scenario to be paused until both are created? If not, then you cannot use the
delay
method. you would need to use an int timer field.
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
151
152
153
154
155
156
157
X