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
AddPoints
By dendepen, with 1 reply.
Replied to by danpost, over 9 years ago:
You cannot set the Gardener field of the SprayWater object when you do not have a reference to the object. Do not create the SprayWater object in the 'addObect' line -- create it before the line, set the Gardener object reference in it and then add it to the world: <Code Omitted>
Why can't i add a 3th background in scrolling??
By Jochends, with 11 replies.
Last reply by danpost, over 9 years ago:
Jochends wrote...
With this code i can only put the 'Steen' on an 'X and Y' coördinate that is inside my screen '1000 pixels on 400 pixels, and not in the scrolling( outside the 1000 pixels ). <Code Omitted>
You have an unbounded world -- you can put any object anywhere regardless of whether on-screen or not.
i can put my object also INSIDE my scrolling world on the Y-Coördinate '357' and on top of the 4th 'steen' with the '(t==3), so that is fine also. But with what code can i put an object on a RANDOM Y-coördinate INSIDE my scrolling?
HELP! Confused on how to continue. if/then react to user input
By Stillinski24, with 10 replies.
Last reply by Stillinski24, over 9 years ago:
Thank you so much @danpost and @Super_Hippo my code worked!
Platforms
By colinj, with 2 replies.
Last reply by danpost, over 9 years ago:
The code given above does not give the behavior you were wanting. However, using the same added field, you can replace lines 28 through 32 with this to get the desired behavior: <Code Omitted>
why calculator is not working
By divinity, with 15 replies.
Last reply by danpost, over 9 years ago:
divinity wrote...
i m trying to follow your direction on the greenfoot thing and it is giving me an error access denied.
You need to more specific in what you are attempting to do and what you are doing when you get the error and copy/pasting the entire output of the error message.
Fading Starting Screen
By Hondrok, with 6 replies.
Last reply by danpost, over 9 years ago:
The transparency of an image is given in int values. This means that if you wish to fade back in as slowly as you are doing here, then 'fade' in line 13 will need to be converted to an 'int' value. I cannot say why you added the 'if' statement to the code as the Start_scr_a object would either be placed into a world because of that condition or automatically. Also, using a 'while' loop is not going to accomplish what you want as it is ran completely (in a single execution of act) before any screen updates -- lines 11 through 15 ( with 'fade' in line 13 corrected to '(int)fade' ) would be eq
Touching of two objects.
By PenguinPower, with 2 replies.
Last reply by PenguinPower, over 9 years ago:
Thank you so much :)
Problem with adding objects
By cooknj, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Try to use this instead of the current lines 11-16. <Code Omitted>
bad operand type for binary operator
By divinity, with 2 replies.
Last reply by divinity, over 9 years ago:
thank u super_hippo and happy new year to you and yours
Divide by Zero Errors
By Theangryman, with 3 replies.
Last reply by Theangryman, over 9 years ago:
@Super_Hippo I tried out your method and it worked, thanks. @danpost Yeah, I understand what it is you're getting at, I had troubles using 120 as the max value when the length of the bar was 320 due to rounding errors, so instead I'm just gonna fudge it (read: be lazy) and make sure all the values I use are factors of 300 for the bar length and bar segment length.
Multiple Rock objects are created
By Salamander, with 7 replies.
Last reply by Salamander, over 9 years ago:
Thank both of you so much. All the errors are fixed and I am very grateful. I also appreciate how both of you have taken so much time to help us programming noobs with our problems. I tip my cap to both of you.
Numbers being pressed in order
By new113, with 2 replies.
Last reply by new113, over 9 years ago:
Thanks for your help
Collision Detection
By BrownDwarf, with 1 reply.
Replied to by danpost, over 9 years ago:
There are countless discussions on this issue. You can search for them by entering key words in the search field above ("platform collision" might get you somewhere).
2 Player Scoreboard
By Ryanmoss139, with 3 replies.
Last reply by Ryanmoss139, over 9 years ago:
I will check out the tutorial and have a go at writing the code for one. I have now deleted the code that i wrote but if I run into further troubles I will let you guys know. I am writing the code now so I may return for help in an hour or so if you guys are around then. Thanks for the help!
Scored board java.lang.null error help URGENT!
By teruc2, with 1 reply.
Replied to by Super_Hippo, over 9 years ago:
Show your 'MyWorld' code.
408
409
410
411
412
413
414
X