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
source code
By ande, with no replies.
would you give me source code ,. make a score for game,
Counting class in the world
By glendriv, with 11 replies.
Last reply by glendriv, over 10 years ago:
Thanks i will try it
Animation problem
By MyHeadHurts, with 1 reply.
Replied to by danpost, over 10 years ago:
You could just introduce a boolean field, call it 'started'. Use it as the condition to continue the animation. Set it to true when the button is pressed and set it to false when the last image of the animation is shown. As an alternative, you could try using my Animation class. It is located in my Support Classes collection.
How to Update?
By Doggygaming, with 2 replies.
Last reply by Doggygaming, over 10 years ago:
oh ok thx :P
How to add a score counter
By Doggygaming, with 2 replies.
Last reply by Doggygaming, over 10 years ago:
thx :P
Need help! (Robot Arm)
By Greenfootfan1, with 5 replies.
Last reply by Greenfootfan1, over 10 years ago:
Thanks for your tips! I finally managed to do it! Thanks a lot!
Background music
By MyHeadHurts, with 1 reply.
Replied to by danpost, over 10 years ago:
You can use the World class method 'started' to get the music to start when the program is started. Please refer to the
World class API documentation
for information on this method. You can look the code to my
BgMusic Actor Class Demo
scenario to see how the music can be controlled. You can even just import the BGMusic class into your project and use it yourself (it was created as a support class).
Playing a Sound at a specific turn
By KuanTi, with 1 reply.
Replied to by danpost, over 10 years ago:
KuanTi wrote...
In the crab class, how do I play a sound when the crab is making a sharp turn more than 18 degrees ?
Show the crab class code that you currently have.
Is there a way to allow actors to go out of the world?
By bobbyjones2000, with 1 reply.
Replied to by danpost, over 10 years ago:
Please refer to the
World class API documentation
-- particularly the constructors of the class.
Editor Problems
By Toly, with 2 replies.
Last reply by Toly, over 10 years ago:
Thanks! As soon as I tried this, it started working!
Need help moving worms
By Alucard, with 2 replies.
Last reply by Toly, over 10 years ago:
What you have is public void checkKeypress() { if (Greenfoot.isKeyLeft("up")) { turn(-3); } if (Greenfoot.isKeyRigh("down")) { turn(3); } } } It should be public void checkKeypress() { if (Greenfoot.isKeyDown("up")) { turn(-3); } if (Greenfoot.isKeyDown("down")) { turn(3); } } } Greenfoot.isKeyDown just means if the key is being pressed or not, not which key is being pressed.
Having trouble updating Wolrd when changing slider.
By RedPanda98, with 3 replies.
Last reply by danpost, over 10 years ago:
Okay -- the slider class is not limited, as far as its behavior, to your project (other than what its name implies). That is, there is no code in it which refers to other classes specific to your project. This means that it is re-usable and portable (after generalizing the name and the value fields, 'temp' and 'particles'). In turn, it means that you do not need multiple classes, one for each type slider; you can have one Slider class and use it for all your Slider objects (the value field should be an instance field, not a class field -- not 'static'). Anyway, to get back to your issue,
Wait Function
By AMiscool, with 3 replies.
Last reply by danpost, over 10 years ago:
AMiscool wrote...
@danpost It doesn't really matter for me. I morely want the user to be able to hold down the button while shots are fired with a 3 second delay. But if you can't, then its fine with the other option.
The you only need at an instance int field for a delay timer. When a shot is fired set it to like 150 or 200. In the act method you can ask if it is zero or not; when zero, shoot if key is pressed; if not zero, subtract one from it:
Open Edidtor
By settledacorn, with 2 replies.
Last reply by danpost, over 10 years ago:
trimil wrote...
What do you mean by "cheat things", exactly?
I believe it is the auto-completion feature that is being referred to here. I am not familiar with the latest version of greenfoot; but, possibly there is some new control within the preferences that can be adjusted for this (from menubar: "Edit>Preferences.." -- maybe in the 'Editor' tab).
Java heap space
By Vellyxenya, with 11 replies.
Last reply by danpost, over 10 years ago:
Vellyxenya wrote...
I checked again and after adding more sounds it's 250 Mo: 200Mo for the sounds 30Mo for the images 20Mo for the rest Didn't expect that the sounds would be so heavy
You could temporarily comment out all statements relating to sounds and remove the sound files from the project (saving them somewhere outside the project folder so you can re-import them later); then, see if you still have heap space issues.
488
489
490
491
492
493
494
X