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
HELP ME
By aaron1011, with no replies.
Hi , im trying to use kinect server in windows 10 , but doesnt works :( , i followed these l steps : http://www.greenfoot.org/doc/kinect SO : WINDOWS 10 x64 GREENFOOT VERSION : 3.0.2 please healp me ::(
Cars scenario
By Trunks, with 10 replies.
Last reply by Trunks, over 10 years ago:
Thank you for all your replies, I have made one of the stupidest mistake of my life, it was just a problem with a name, GreenFoot didn't recognize "Explosion.png" because the file's name was " Explode.png" hahaha !
Sound Out-of-Bounds and Mobspawning
By ZacBuzzsaw, with 3 replies.
Last reply by danpost, over 10 years ago:
I think that is because you have information tags in your sound file. Try resaving the files without them.
Can't produce actors on any scenario
By Laurence, with 1 reply.
Replied to by davmac, over 10 years ago:
This looks like a partial stack trace. The first part (including the exception type) has been cut off. Are you able to get the full stack trace? (Try turning on the "unlimited buffering" optional from the terminal menu). Also, what version of Greenfoot are you using?
I need help with The words were stained as they set
By Kevin.irwanto, with no replies.
Help me with the code please.. I want to make "the words were stained as they set". thanks
I keep getting a terminal window when my projectile hits something and dissapears.
By bjornjulian00, with 1 reply.
Replied to by danpost, over 10 years ago:
All your methods called from the act method, except for the 'move' method, could potentially remove the actor from the world. If any but the last one does, you will get that error. You could either place the following line between each method: <Code Omitted>or you can preceed each method call like this example <Code Omitted>
How do I load another world after certain actors dissapear?
By bjornjulian00, with 1 reply.
Replied to by danpost, over 10 years ago:
In Level1 act method, add this line: <Code Omitted>
Gif keeps creating a terminal error
By Laurence, with 1 reply.
Replied to by danpost, over 10 years ago:
I suggest you create a new simple scenario that reproduces this error, then comment out the adding of the object into the world and upload the scenario, publishing source, here so we can look at the issue first-hand.
How do I get a button to change to another button sprite when I hover over it?
By bjornjulian00, with 8 replies.
Last reply by danpost, over 10 years ago:
@valdes, I am so sorry. I stated that the change in line five was to prevent flicker -- and that is not what I meant to say (that is why the changes was not perceptible to your eye). That change was introduced so that the image of the actor was not continuously being set when it was not changing.
getObjectInRange
By Laurence, with 10 replies.
Last reply by danpost, over 10 years ago:
To be specific, the Actor class API says this:
protected java.util.List getObjectsInRange(int radius, java.lang.Class cls) Return all objects within range 'radius' around this object.
'protected' means you can only call the method from an Actor subclass (or the Actor class which you cannot edit); 'java.util.List' means it returns a List object (btw, the method never returns 'null'); 'getObjectsInRange' is the name of the method; 'int radius' is the first parameter which should be a positive integer indicating how far the search extends; 'java.lang.Class cls' is the seco
how do I keep adding the same object every 120 pixels downwards
By Orko, with 1 reply.
Replied to by SPower, over 10 years ago:
You could use a for-loop for that, instead of writing it all out in separate lines. And please, use the code tags next time instead of bold tags.
Using getX & getY in world?
By idk1234, with 119 replies.
Last reply by davmac, over 10 years ago:
what do you mean by initialised? Do you mean this?
No. Those statements
declare
the variables, but do not initialise them (give them a value). So, they get the default value for reference variables, which is null (essentially meaning "no object"). That is why you later get an exception - you're trying to call setLocation on no object. It is difficult to help you because it's not clear what class the "respawn" and "respawnLocation" methods are in. If it is in the Virus class, you don't need to call setLocation on
another
object. If its in some other class,
Side Scrolling World
By AreebRaza, with 2 replies.
Last reply by AreebRaza, over 10 years ago:
Appreciate for the reply but i finally found a scenario that suits my scenario.
making objects fall down
By dearhart18, with 1 reply.
Replied to by valdes, over 10 years ago:
Check out my
Glutton Babies
. Class Comida and subclasses are the falling down objects int the act() method of my World is the random creation
Help with understanding getOneIntersectingObject
By Bat8, with 2 replies.
Last reply by Bat8, over 10 years ago:
SPower wrote...
The getOneIntersectingObject returns one of the objects that is currently intersecting the actor calling the function. If many enemies are touching your actor, then, it would only return one of those. If, however, there are no objects currently intersecting it, then it cannot return an object, so it returns null. Null is the type for 'no object', you could say. So, the if-statment is to check if the function does not return null, i.e. if it does return an object.
Thank you! I was looking for an explanation on the internet. All of them were very long and complicated and
463
464
465
466
467
468
469
X