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 make the transition of images delayed?
By Alola_Sandslash, with 5 replies.
Last reply by Alola_Sandslash, over 9 years ago:
It works much better now except while going right the actor's images flip between facing left and facing right every second or so.
Spawn only if none are in the world?
By alexaa, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
The following will return 'true' if no Orb is in the world. You can use it as another if condition. <Code Omitted>
Help Me Please :(
By dadansi, with 6 replies.
Last reply by danpost, over 9 years ago:
I will respond here since you asked for me specifically. Unfortunately, I am not at all familiar with the workings of android to help as far as screen sizing or what compiling program might work for you -- sorry.
copyright site:greenfoot
By smcgee, with 1 reply.
Replied to by davmac, over 9 years ago:
I'm afraid that we can't really provide legal advice. There may be provisions such as "fair use" that allow for use of copyright-protected work, though these will vary from country to country; it may or may not be enough that the work is not used for profit and is used in an educational context. I would suggest that the safest course of action is to have your students produce their own artwork or use images from sources that expressly allow re-use. You can use
CC search
for example to find such images.
I got this error when programming, don't know whats wrong plz help
By newmeli20, with 6 replies.
Last reply by newmeli20, over 9 years ago:
Thank you that did the trick.
World.getObject() strange error
By HoperAndDreemurr, with 5 replies.
Last reply by davmac, over 9 years ago:
It would be cool to know what happened exactly
If you were importing java.awt.*, then you were implicitly importing java.awt.Label. That is what caused the error; Label in your code was referring to java.awt.Label, which is not an actor and therefore can't be in the world.
HELP I NEED SOMEBODY!!
By GewoonAxl, with 28 replies.
Last reply by davmac, over 9 years ago:
This forum isn't for random noise, please. Keep it to real discussion of Greenfoot/programming issues.
2 Problems: Images randomly flip sometimes and sometimes my character will die and sometimes it won't
By Alola_Sandslash, with 2 replies.
Last reply by Alola_Sandslash, over 9 years ago:
Can you show me the code to do that?
MiniMap help
By Trystar360, with 3 replies.
Last reply by danpost, over 9 years ago:
Oh, I see. You need to retain the base image (one without any dots) and make copies of that and add the dots to each copy to be set as the current image. So, <Code Omitted>
getObjectsInRange help?
By cococypress21, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
The getObjectsInRange method returns a list, not just an actor. You can use a for-each to go through the list. <Code Omitted>
Remove a class and use an other class to do her job
By Phirippu, with 4 replies.
Last reply by Yehuda, over 9 years ago:
Problem 1: For the Paddle to be removed you need the ball to be touching the paddle when s == 48. If you want to remove all the paddles from the world (which will remove the one that's there), then you can do the following: <Code Omitted> Problem 2: I can't help with what's happening with the Paddle2 with the code you gave, you need to show the full Paddle2 class code.
Start screen not working
By SebiRaul, with 2 replies.
Last reply by SebiRaul, over 9 years ago:
Aah, I completely forgot about the act method. Thank you so much :D.
Why won't my scenario run?
By SilentScoper8, with 1 reply.
Replied to by danpost, over 9 years ago:
Fact 1: an actor must be created prior to it being placed into a world Fact 2: the constructor of an object is executed at the time the object is created This being said, 'getWorld', when used in the constructor of an Actor subclass, must return a 'null' value. Line 15 of the Score class constructor sets 'null' as the value of the 'world' variable. Then, line 16 and 17 tries to call the 'getP!score' and 'getP2score' methods on that 'null' value. Hence, the 'NullPointerException' error you were getting. You could make use of the 'addedToWorld(World) method of the Actor class, which is
Remove an actor from the World class
By JonahZW, with 3 replies.
Last reply by danpost, over 9 years ago:
There is no code to add a ball into the world (nor created). So 'myBall' is never assigned any Ball object that can be removed.
Counter to 9 To change a new world
By GrowlerGaming, with 1 reply.
Replied to by danpost, over 9 years ago:
GrowlerGaming wrote...
I am trying to set my code up so that when all _Goldballs are gone that It sends the user to Level02.
I am not sure what 'Counter' would be, either. But, it sounds like all you need is the following for line 3 <Code Omitted>
342
343
344
345
346
347
348
X