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
Dragging with the mouse
By behappy2, with 14 replies.
Last reply by danpost, about 10 years ago:
The field type on line 6 should be 'boolean' -- with a lowercase 'b'. Using an uppercase 'B' will have the field treated as an Object field reference of type Boolean instead of as a primitive type boolean field. As an object reference, its default value is 'null'; as a primitive field, it is assigned a value of 'false' by default. Also, all your multi-line comments should begin with '/**', using two asterisks. That way, at least in the postings here, some of your code lines will not look like comment lines because of their text color.
Enemy not spawning with current method, no syntax but no spawn
By JWK3986, with 2 replies.
Last reply by JWK3986, about 10 years ago:
Ok, I see where I went wrong. I cut Line 23, created an act method in my World class and added the spawnPuffer method to it, and adjusted the If statement condition in order to slow down the spawning rate since at 20% it seemed ridiculously fast. I also commented out line 83 and it works as intended still, that line may have been redundant. Thanks for the help, once again lol.
Need help creating the effect of moving ground
By JWK3986, with 12 replies.
Last reply by JWK3986, about 10 years ago:
Ok, makes sense. Thanks again!
Jump Once per Key Press
By gmacias, with 2 replies.
Last reply by gmacias, about 10 years ago:
Ok, thank you!
MP3 player with Vol up and Vol down buttons
By ED1990, with 3 replies.
Last reply by danpost, about 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, about 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, about 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, about 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, about 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, about 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, about 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, about 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, about 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, about 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
432
433
434
435
436
437
438
X