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
Objects get stuck at top and right of screen?
By JarJarBanks7, with 13 replies.
Last reply by danpost, almost 9 years ago:
JarJarBanks7 wrote...
One problem though,using an else statement would only work if there were only two directions; if an else is used, then if it isnt 1 it would run the d==2 code .same goes for any other d= statement that you add an else to.If this isnt what you meant then explain further or if willing,give example code
You could just add an 'else' at the beginning of lines 56 and 62. That way each axis is treated separately.
the fruit doesnt glitch out and constantly try to move left and right a the same time, it just stops, sometimes before the edge
This was becaus
How to add game you made
By JovanLazic, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
You want to upload a scenario? In your Greenfoot program, click on Export in the top right corner.
Issue with counter (nullexceptionerror)
By ladamson, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
The issue is (probably) in your WombatWorld class. Please use the 'code' tags to post code.
java.lang.OutOfMemoryError: HOW CAN I SOLVE IT
By dimpap5555, with 5 replies.
Last reply by dimpap5555, almost 9 years ago:
Thank you very much guys if i have new problems i will inform you again
gameover
By Dayuyu, with 5 replies.
Last reply by Dayuyu, almost 9 years ago:
i done it thank for help
Final score
By Dayuyu, with 1 reply.
Replied to by danpost, almost 9 years ago:
You could just have the final world add the Score object to itself with something like this: <Code Omitted>
pause button
By Dayuyu, with 2 replies.
Last reply by Dayuyu, almost 9 years ago:
ok i have object overtop...now i fix that... it work.. thank..
Snake game- score counter
By nush99, with 1 reply.
Replied to by danpost, almost 9 years ago:
Whether you want a visible counter or not, you can check out my
Value Display Tutorial
scenario.
Random timed movement, ranged player detection and camera tracking
By Parte, with 113 replies.
Last reply by Parte, almost 9 years ago:
danpost wrote...
Parte wrote...
I have added a Movement_Test2 class because if the code for the movement (moving up,down,left,right) are in the same class as the Player class which contains the mouse movement; the player will merge with the walls when up against the walls as the player turns, to avoid this I split the movement of the player into a separate class.
There would be no difference had you placed the movement code in the act method of the class of the player. You can still be moving, or adjusting the location of the player, on similar conditions. That is, I realize that the im
Actor not in the world error
By ymym, with 2 replies.
Last reply by danpost, almost 9 years ago:
You could also force an immediate exit from the act method by adding a return statement after removing the actor from the world: <Code Omitted>Any other actions you may want to do when the actor is removed can be done before the return statement (or even before removing the actor).
My game- snake eats food
By nush99, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
Instead of line 44, use this: <Code Omitted>You have to rename the method to something else or it won't work (line 43 calls the method in which it is in which will call the method again and so on). And then, at the end of the act-method, you need a call to the new method.
Jump 'n' Run scrolling camera
By Tritos, with 4 replies.
Last reply by Tritos, almost 9 years ago:
Thanks very much. It really helps me. I will try to get it to work for me tomorrow.
Problems with falling and getObjectAtOffset
By Tritos, with 8 replies.
Last reply by Tritos, almost 9 years ago:
Thank you very much. That solution works perfectly and is exactly what I searched for!
Actor code not working for reasons so far unknown.
By ginger--ale, with 1 reply.
Replied to by Super_Hippo, almost 9 years ago:
Without showing the code you are talking about, it will be pretty impossible to guess what is wrong. Show the code and the error message.
Variables in Greenfoot methods?
By Gold_Leader, with 2 replies.
Last reply by Gold_Leader, almost 9 years ago:
Thanks a lot! You are a life saver!!! ^-^
438
439
440
441
442
443
444
X