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
Jump Once per Key Press
By gmacias, with 2 replies.
Last reply by gmacias, almost 10 years ago:
Ok, thank you!
MP3 player with Vol up and Vol down buttons
By ED1990, with 3 replies.
Last reply by danpost, almost 10 years ago:
I kind of figured that the Volume class was for displaying the current volume -- just wanted to be sure of that and that there was nothing there that might influence the current volume. From your last post, it appears that there may be a bug in the implementation greenfoot has for sound volume with your version.
Screen Wrap
By LimeLava, with 1 reply.
Replied to by LimeLava, almost 10 years ago:
Never Mind I used a different thing and figured it out
How would I gradually increase the size of an image?
By Astralman, with 3 replies.
Last reply by Astralman, almost 10 years ago:
Thanks guy :)
@danpost fix my breakout game
By JarJarBanks7, with no replies.
its on my profile
im trying to spawn a drone every time i = 4
By hockeydude1155, with 6 replies.
Last reply by danpost, almost 10 years ago:
Try <Code Omitted>Your line 12 needs to be moved outside the method, though.
How do I make a global variable, or at least something that works like one?
By wasd, with 2 replies.
Last reply by danpost, almost 10 years ago:
Use instance 'private int' fields in your world class and add a 'public int getInteger_()' for each one so the actors can access the value of them with (using MyWorld as world class name): <Code Omitted>You can change the underscores simulateously to whatever, for example 'A', 'B', 'C', ..., for each field. Actually, you can name they whatever you want, I just wanted to point out that all underscored names are referring to the same field.
What is wrong with this code?
By Jacobblepop, with 1 reply.
Replied to by danpost, almost 10 years ago:
Jacobblepop wrote...
What is wrong with this code?"
Line 9 should start 'Rabbit newRabbit = ...".
java.lang.IllegalStateException: Actor not in world.....
By Sepho, with 4 replies.
Last reply by Sepho, almost 10 years ago:
oh i see thank you it is working now
Freezing and lagging in this scenario
By JonnyB7, with 8 replies.
Last reply by JonnyB7, almost 10 years ago:
Thanks for the advice on both topics. Yeah key control got messed up because I was trying to add directional shooting for the bullets then I forgot to take it out once I realized that was not the way to do it. Thanks, Let you know if I make any progress.
How to change int to String??
By slchoiaa, with 4 replies.
Last reply by danpost, almost 10 years ago:
Nosson1459 wrote...
y would u want 2 convert a string to an int
That is not what is happening here. We are taking numeric values and adding their digital characters to a string. However, there are several good reasons why one might want to convert a numeric string into a number. This is often done when a numeric value is input as a string or read as a string from file data.
how to make an image move constantly to the left
By hockeydude1155, with 2 replies.
Last reply by Nosson1459, almost 10 years ago:
either <Code Omitted>or<Code Omitted>the diff. is dat "move" will be based on which way background is facing "setLocation" will move left regardless
How to create composite Actors
By MrBradley, with 11 replies.
Last reply by Nosson1459, almost 10 years ago:
MrBradley wrote...
I'm looking to build a container to hold multiple Actors. Has this been done before? An example would be to have an adventure hero with a health bar.
u cud make it part of the heroes picture and a field in the hero will change the picture based on how healthy he is, so for example every 4 hits knocks down 1 of 6 bars changing the pic to only show 5 bars left, and so on
Trying to get actor to maintain the scale specified in code for constructor
By JWK3986, with 2 replies.
Last reply by JWK3986, almost 10 years ago:
Thank you, that works exactly the way I needed.
if(isTouching(object.class)
By ZoeF, with 3 replies.
Last reply by ZoeF, almost 10 years ago:
I like to thank you all for the idees. As i needed to wait 12h to get my post approved i found another solution wich suits me pretty wel. I removed the idee of istouching and worked with 2 arrays in my enemies super.class.
432
433
434
435
436
437
438
X