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
Hi, I am new here!
By TinaM, with 2 replies.
Last reply by benimen16, almost 11 years ago:
Just like what Velly said, you must have Greenfoot in order to create a game and upload it to the website. If you really want to upload games to here, then the only thing I can think of would be to wait for it to download even though you have slow Internet, that's what I had to do.
If mouseClicked(!null)
By RussellBlo, with 1 reply.
Replied to by danpost, almost 11 years ago:
The documentation of the
mouseClicked
method of the
Greenfoot
class says this:
If the parameter is
null
, then true will be returned for any click, independent of the target clicked on.
By specifying
null
, you are saying that you do not care what is clicked on; you are just wanting to know if the mouse was clicked at all. By the way,
null
is used as a replacement value that represents the absence of an object and is not a boolean value that can be negated. Its type is whatever type of Object it is replacing. For example:
Possible lossy conversion rates from long to int
By Hydrowarrior, with 1 reply.
Replied to by Hydrowarrior, almost 11 years ago:
Don't reply I figured it out, I needed to put (int) in front of Math.round.
java.lang.NoClassDefFoundError: Could not initialize class Hyrle
By J0SH1X, with no replies.
hey im trinig to do the first zelda game for my school project but if i do new hyrule i get this error above here is my project https://www.dropbox.com/s/nqfx8vphnfgs4tw/Schulprojekt%20%28The%20Legend%20of%20Zelda%29.zip?dl=0
Keep updating a counter while transferring worlds?
By Shurp, with 3 replies.
Last reply by danpost, almost 11 years ago:
Okay -- two of these three set of code should not compile. You should be getting 'cannot find symbol variable thumbius' in your OverWorld class and you should be getting 'cannot find symbol variable lucius' in your Question1 class. You cannot use variable names in your classes that are not previously declared. As far as the counters/worlds are concerned -- I will presume that your initial active World is of type OverWorld, where you player is located. This is the world that your ONE counter should be in. Also, you should not programmatically create another instance of this type world (l
addCameraFollower and Scrolling world
By omgxoxo, with 1 reply.
Replied to by danpost, almost 11 years ago:
You need to specify where you got your ScrollWorld class or post it code here.
How to put my game into HTML 5? ...I know you can export the game into html using the share button but html 5 does not support the applet tag so therefore I am assuming I am meant to use the object tag. HELP
By Malv22, with no replies.
How to put my game into HTML 5? ...I know you can export the game into html using the share button but html 5 does not support the applet tag so therefore I am assuming I am meant to use the object tag. HELP
Error in my pizza fatcat
By lupejimenez95, with 1 reply.
Replied to by danpost, almost 11 years ago:
The signature for the 'setLocation' method of the Actor class is: setLocation(int x, int y) As you can see, there are two arguments that are both of type 'int'. Your 'setLocation' statement given above only shows one argument, not two.
Both World and Actor have act() methods. How affected by Run command?
By keizerbob, with 2 replies.
Last reply by keizerbob, almost 11 years ago:
danpost:Thanks for the explanation. It helps me assign supervisory and action roles in the World and Actors in my scenario.
Remove an object from a World, Add to Another at the same time?!?!?
By eve19, with 16 replies.
Last reply by eve19, almost 11 years ago:
You are awesome!!!! :')
Direction of Ball
By GreenMan15, with 5 replies.
Last reply by Super_Hippo, almost 11 years ago:
That would only let the ball set its rotation to right or left randomly in every act cycle... What do you want to achieve?
move question
By sms926, with 3 replies.
Last reply by davmac, almost 11 years ago:
sms926 wrote...
I know how to have an actor hit the face and turn. How do I have the actor be able to go through and only through the bottom face?
I think you'll get more directly useful answers if you post the code that you already have, even if it doesn't yet do what you want it to. :)
Need a tip for a sound
By Vellyxenya, with 6 replies.
Last reply by Vellyxenya, almost 11 years ago:
It's ok, it doesn't do that awkward sound anymore with a high-pitched one. I got one last problem: I have a background music that runs non-stop, but whenever there's another sound (like shooting sounds) the volume of the background music turns down, is there a way to have always the same volume for the background music please even if there's also another sound running??
Reference to objects in world
By Lauri, with 2 replies.
Last reply by danpost, almost 11 years ago:
There are a couple of issues with the code given. First, if the code is in your World subclass, then you cannot use the method 'getOneObjectAtOffset' without specifying an Actor object to run the method on (there is no method with that name in the World class API -- only in the Actor class API). Besides that, the method has 'protected' access and cannot be called from any class that is not a subclass of Actor. Second, lines 4 and 5 of the method given are creating new Actor objects which are not the ones already in your world and any reference to them, 'quadar' and 'quadarL', later in the m
Confusing Homework Problem
By GreenMan15, with 2 replies.
Last reply by danpost, almost 11 years ago:
GreenMan15 wrote...
I am wondering what the last statement means
It means any one of the following: * create a new ball object * instantiate an object of the Ball class * call the Ball class constructor with 'new Ball()' The constructor call returns the object created and can be put to use immediately or held in an Object reference variable and used one or more times later. Normally, when an Actor object (the Ball class is probably a class that extends the Actor class) is created, it is immediately placed into the world; but, this also can be done in two steps -- the creati
499
500
501
502
503
504
505
X