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
LOOKING FOR CODERS
By SuaveX, with no replies.
So workload for a specific game we are creating is getting high and I am looking for some creators who want to volunteer to do some work, skill has to be med-high and able to adapt to certain conditions... THANKS!
I have a problem
By MadRay05, with 1 reply.
Replied to by danpost, about 2 years ago:
MadRay05 wrote...
I have a little space game with a rocket that tries not to touch asteroids. now, that worked well, the rocket touches the asteroid, the game restarts. The problem is, I made another object, a little red dot and I want, when Rocket touches it, to give it something (movement speed +1, for example). I tried everything, nothing works, didn't found something on internet neither. It's my first day, what to do? Also, the ball does not disappear when I touch it
You will need to show some attempted codes on having, or trying to have, it function as you want. Best is to show th
Mr.Mouse Chapter-2
By sashvanth, with 3 replies.
Last reply by sashvanth, about 2 years ago:
thankyou
when I save the world
By sashvanth, with 1 reply.
Replied to by danpost, about 2 years ago:
sashvanth wrote...
hello, when I save the world, I keep all the classes in a specific position and when I save it, All the classes are not in the place where I kept them. what could be the problem ?
I believe the class tree is built, or rebuilt, during compilation based on how the dependencies are found in the code during compilation. I doubt it would be very easy to control the order of class positions precisely.
Why are my if statements not working?
By classictommy, with 7 replies.
Last reply by danpost, about 2 years ago:
Spock47 wrote...
That else-statement looks very suspicious to me, e.g. if rotation is 270 before, it stays at 270.
A 270 rotation is straight up. That is not part of a "pyramid" shape. With the rotation set to any odd multiple of 45, the code should work and all movement will remain at odd multiples of 45.
Export HTML5 conversion of a game locally..?
By shoe, with 7 replies.
Last reply by RcCookie, over 2 years ago:
Nice to see that these are actually some people active รถ behind the scenes
how do i make an actor disappear when they hit
By Fallen_Bird, with 3 replies.
Last reply by rdFx, over 2 years ago:
Fallen_Bird wrote...
in my book it saying to put a code but it's not working here is the code: //... if(canSee(Rocket.class)) { eat(Rocket.(class); //...
Typo here!? Should be eat(Rocket.class); I guess..
How to keep a variable even after restarting Greenfoot?
By Gerrit486, with 2 replies.
Last reply by danpost, over 2 years ago:
rdFx wrote...
You could use static fields to keep track of which levels were unlocked before:
This will work during a single session, but will not work when going from one session to the next (scenario is closed and reopened -- or recompiled). For that, you will have to use a file or database to store the progress. A file is sufficient provided you do not upload the scenario onto a website. To work on a webpage, Greenfoot provides the UserInfo class to allow variables to have their changing values stored in a database.
Hello, can I get my account deleted?
By Shockal, with no replies.
Title.
Exception instantiating world class:java.lang.IllegalArgumentException
By LIU-25535, with 2 replies.
Last reply by LIU-25535, over 2 years ago:
I have already finished it. Thanks a million. I really appreciate it.
Please help :)
By LoafofBrad, with 3 replies.
Last reply by danpost, over 2 years ago:
Oops -- line 24 above should be: <Code Omitted>(missed the closing square bracket for the index of the array)
Very hard for a beginner!!
By Jpinkham, with 1 reply.
Replied to by danpost, over 2 years ago:
Jpinkham wrote...
The game was working fine but when i tried to put timer then the game started to crash down. I removed the timer but still it shows error but doesn't show where the error is. I tried restarting it, now it wont even open and wont show Mainworld() sub class. Can anyone please help me with this?
You will either have to upload your scenario to this site with publish source code checkbox checked or show all your class codes here (using 'code' tags).
How can I put a delay between bullets?
By DavidZyy, with 1 reply.
Replied to by Spock47, over 2 years ago:
First thing is to decide how long the delay between two bullets should be, e.g. "2 seconds". Since Greenfoot regularly calls the act method, the unit for the delay should be "number of calls to the act method" (/"cycles"). On normal speed, Greenfoot calls the act method approximately 60 times a second. 1. So, let's define a constant for the duration until the next bullet can be fired: <Code Omitted> 2. Next, an attribute is needed that stores the current state of the cooldown, e.g. storing the remaining time (in cycle
Is it possible that a scenario stops and restarts itself?
By lehrerfreund, with 6 replies.
Last reply by rdFx, over 2 years ago:
I'm not sure but this might help you. You can always define methods in the World class that are callable via right click on the scenario screen. So in your case you might want to add a method "showTutorialText()" or "switchSound()" that is defined in your World class (needs to be public i guess) and is callable via right click (a drop down with all methods should be shown). This only works if you don't need to run your scenario as an app but it will work if the scenario is paused in greenfoot!
Stop all GreenfootSounds at once?
By lehrerfreund, with 7 replies.
Last reply by Spock47, over 2 years ago:
lehrerfreund wrote...
There is one flaw: If a not registered sound is called (...) a FileNotFoundException is thrown by the create-method.
Good catch! :)
29
30
31
32
33
34
35
X