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
How do i move an object always to one direction with getX and getY?
By Recorsi, with 4 replies.
Last reply by Recorsi, over 8 years ago:
Super_Hippo wrote...
Try this: <Code Omitted> move(
Thank you it works :)
Adding an image into the world
By Juno, with 1 reply.
Replied to by danpost, over 8 years ago:
Juno wrote...
How do i add in an image in the world without it having an actor or class?
You can draw the image onto the background image of the world, however, that would be a permanent change and the removing of it may not be quite so simple.
moving an actor on top of another visually
By Juno, with 2 replies.
Last reply by Juno, over 8 years ago:
thank you
Why does this have an error at the "List" part of the code?
By itssemu, with 2 replies.
Last reply by itssemu, over 8 years ago:
thanks this worked!
Problem with ball spawning
By Aqurila, with 6 replies.
Last reply by Game/maniac, over 8 years ago:
You have put 'if (isRunning)' inside 'if (Greenfoot.mouseClicked(start))', however it must come after 'if (Greenfoot.mouseClicked(start))'
Removing hearts from an health bar
By Kestroz, with 2 replies.
Last reply by Game/maniac, over 8 years ago:
Continuing from Super_Hippo's solution you could use a stack instead of an array for easier management. I would also recommend encapsulating the hearts inside a class. Here is an example:
Calling a method from an actor to world
By Aqurila, with 6 replies.
Last reply by Aqurila, over 8 years ago:
No, actually if there is no ball it should stop to create any new balls which spawn because the code is getting executed again because of the timer :D but we finally got a solution
Can I have text appear for x amount of time?
By MilesChamomile, with 1 reply.
Replied to by nolttr21, over 8 years ago:
try this code: <Code Omitted> If you have any questions just ask
How can I hide an actor with out deleting it??
By Timmy_11, with 1 reply.
Replied to by Timmy_11, over 8 years ago:
Never mind I used <Code Omitted>to make it transparent
How can I determine which actor to change color
By Brantgarron, with 7 replies.
Last reply by doglover555, over 8 years ago:
c'mon Brantgarron
Remove all the actors of a class
By Aqurila, with 5 replies.
Last reply by danpost, over 8 years ago:
Aqurila wrote...
So if I use for example getWorld().removeObjects(java.util.Collection<? extends Actor> objects), I have to first create a list of objects?
Yes. Find an additional method among those provided.
How do I get an actor to randomly move along a set point on the X axis but move on the Y?
By itssemu, with 8 replies.
Last reply by itssemu, over 8 years ago:
thankyou!
delay
By doglover555, with 12 replies.
Last reply by danpost, over 8 years ago:
doglover555 wrote...
Is there a way to do a method like that though or should I use a way from above?
It is possible, but you may still have to modify the act method due to the removal of the actor from the world. The code would still be like what I gave above with the modified line 7-- probably with and 'else if' for initiating the timer.
Why does this Keep on giving me a null pointer exception?
By itssemu, with 4 replies.
Last reply by Juno, over 8 years ago:
i was literally going to ask you how to do this but i guess it's answered :) - a guy in your class
Gamepad Help
By BluRogue714, with no replies.
So, i want to implement a gamepad for my little world scroller game. I downloaded both the GamePad Template and the GamePad Tester scenarios. After opening the scenarios, I get a whole list of error messages mostly saying either certain packages do not exist (such as “package net.java.games.input does not exist”) or certain classes cannot be found (like “cannot find symbol - class Controller”). I can’t name specifics and there may also be other types of errors that I have not yet seen mainly due to the fact my computer is literally getting hundreds of error messages whenever I open up ANY of the greenfoot GamePad scenarios. Did I download anything wrong or are the scenarios just in serious need of updating? Any help is appreciated.
278
279
280
281
282
283
284
X