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
Question regarding the "asteroids" game
By madeirense, with 3 replies.
Last reply by Super_Hippo, over 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, over 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, over 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, over 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, over 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, over 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, over 10 years ago:
ah , thanks for the help... :)
Character falls through ground
By greg92, with 1 reply.
Replied to by Super_Hippo, over 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.
cant play scenario on greenfoot
By AChan, with 1 reply.
Replied to by Super_Hippo, over 10 years ago:
Your uploaded scenarios work. Which browser and java version do you use?
Ending Game Using Counter
By HolyMatrixManiac, with 14 replies.
Last reply by HolyMatrixManiac, over 10 years ago:
Thanks for condensing the prepare method! I'll check the code for placing the fruit. Thought I had it in bounds but I'll review. Thanks!
Where is the error?
By ZoeSolosobal, with 1 reply.
Replied to by danpost, over 10 years ago:
None of the methods, 'checkForKeypress', 'turnAtEdge', 'canSeeFishFoodPellets', 'lookForFishFoodPellets' and 'eatFishFoodPellets', are linked to the 'act' method in any way. You need to call a method for it to execute (greenfoot calls the 'act' method).
Game Over Screen
By Sir_brandon_, with 22 replies.
Last reply by Sir_brandon_, over 10 years ago:
thanks :)
Issues with Bullet Code
By sillfish, with 3 replies.
Last reply by danpost, over 10 years ago:
sillfish wrote...
We still need help with a counter
You could check my
Value Display Tutorial
scenario out on this issue.
a way to stop shooting after out of bullets
Do not look at it as a way to stop something. Look at it as a way to control something. It is not what to do to stop shooting -- it is what condition is required to shoot. If the counter not zero, you can shoot (the flip side to this is -- if the counter is zero, do not shoot).
code for killing the enemy after they are hit
Have enemy ch
pop up image after actor ereased
By ryvetra, with 3 replies.
Last reply by ryvetra, over 10 years ago:
thanks for the explain .. it works :)
482
483
484
485
486
487
488
X