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
Background music problem
By Cameronte10, with 1 reply.
Replied to by danpost, almost 10 years ago:
If the 'bg' field was made 'static', you could change line 3 to: <Code Omitted>and it should work.
Strange bug with GreenfootImage.clear()
By TinyTertle, with 2 replies.
Last reply by TinyTertle, almost 10 years ago:
That makes so much sense! Thank you so much!
Add Objects depending on variable
By Psychpsyo, with 2 replies.
Last reply by Psychpsyo, almost 10 years ago:
Thanks! That is exactly what I needed.
How to do something on second click, when that second click is on the World.
By iansprograms, with 2 replies.
Last reply by danpost, almost 10 years ago:
I would use an Actor field instead of an int click field (you may want to have more buttons to add different things into the world). This would be done by the following:
Movement with Animation
By Agent40, with 12 replies.
Last reply by danpost, almost 10 years ago:
You can put your images in an array (like I did in mine). You can even place these array inside another array (make a double array): <Code Omitted>Then, when a change in keys is detected (or a change in direction facing), you can set the appropri
Collisions with Platforms
By TudorBlue, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
Show the code you are using.
Question regarding the "asteroids" game
By madeirense, with 3 replies.
Last reply by Super_Hippo, almost 10 years ago:
Instead of the 'mouseClicked' method, you could use the 'mouseDragged' method. I thought the 'shotKeyDown' variable would be there to prevent continuous shots. Actually I don't believe that you really want them to fire continuously like that. You will probably need a timer to delay to shots.
madeirense wrote...
Secondly I don't want the spaceship to turn to where my mouse is pointing
Remove lines 6 and 7 then. I wonder what the 'ignite' method is because you always pass 'true' to it.
Where is the compile all button???
By wo22y, with 2 replies.
Last reply by Super_Hippo, almost 10 years ago:
Just click on the world in Greenfoot's main window and it will compile automatically (or show the errors).
How to display text from file in the World class
By vicbuenaventura, with 4 replies.
Last reply by vicbuenaventura, almost 10 years ago:
Thank you all for your feedback. I just needed to display the last line of text in the World. I was able to do this using the showText method from the World class.
Update 3.0.2 "broke" scenario
By Psychpsyo, with 3 replies.
Last reply by Psychpsyo, almost 10 years ago:
Thanks for the fast answers. It works now. But I still wonder, why it worked before...
remove object after time
By Bassusour, with 1 reply.
Replied to by danpost, almost 10 years ago:
If this code is in the ND class, then you only need to remove 'this': <Code Omitted>
Making a message appear and disapear
By MrSandwich, with 2 replies.
Last reply by MrSandwich, almost 10 years ago:
The constructor is called Nivel because i forgot to change it (I'm writing the program ( the variables and classes names) in another language so that slipped). The enemies is indeed the class, but my thought of process was just to put a simple integer that keeps on incremeting on the act and when it surpasses 5 the message would then disapear ( sort of like a introduction to the level, but I was trying to make it go away ). I'll look into the label class, didn't even know there was one. I'll report here any progress I made.
weird exception
By fejfo, with no replies.
EDIT : I just found my mistake when checking for spelling mistakes but I don't know how to remove a post (it was that i'm using i++ in the second for loop if your wondering) when I run the following code I get this error message : java.lang.ArrayIndexOutOfBoundsException: -2147483648 at Room.generateLevel(Room.java:132) with this printed in the console : i:-2147483648 enemies:2 <Code Omitted> I have no idea how i can be negative if enemies == 2 it should always be lower then 2 right ?
didn't reset ?
By ryvetra, with 23 replies.
Last reply by ryvetra, almost 10 years ago:
ah , thanks for the help... :)
Character falls through ground
By greg92, with 1 reply.
Replied to by Super_Hippo, almost 10 years ago:
What is the ceiling-method supposed to do? It sets vSpeed to 1 if it is touching Ground object. The checkFall.method is the same. The only difference is that it sets vSpeed to 0. I don't think that you need both methods. Every act-cycle, the hero accelerates by 2 downwards. So if the hero is travelling more cells in one act-cycle than the ground is thick, then the hero can fall through it. Well, act-cycle isn't the right word, because the method is executed more than once in each act-cycle, but I think you get what I mean.
480
481
482
483
484
485
486
X