Sign Up, Lost Password
You need to login to take part
Tell me what is wrong here, what I am missing.
By divinity, with 24 replies.
Last reply by divinity, about 2 hours ago:
Many thanks danpost finally got it to work properly and it is thanks for all of the help. and thanks for the patience u have shown me. thanks again <Code Omitted>
By HELP, with 1 reply.
Replied to by Gbasire, 1 day ago:
It's unfortunately not possible to upload a project to app store/play store with greenfoot, but you got a button to publish it on this website, if you want (Ctrl + E)
Check an input is in a certain range and if not displaying an object
By xixEmilyxix, with 20 replies.
Last reply by danpost, 2 days ago:
Thank you, i didnt realise i missed that out
Understandable, as you quoted before I posted the edit. That is why I mentioned it was edited in my post immediate following the given code.
By StndRed, with 2 replies.
Last reply by StndRed, 7 days ago:
can someone tell me what is wrong with my program
By divinity, with 3 replies.
Last reply by danpost, 7 days ago:
You need another closing bracket after line 61 (which means one needs remove somewhere below that -- probably near the end). Similar concerns at lines 75, 89 and possibly elsewhere. Please fix indentations prior to posting here again. All paired bracket should be at the same indentation positions (that will help in keeping them paired properly)
Greenfoot.mouseClicked(this) remove object.
By StndRed, with 5 replies.
Last reply by StndRed, 11 days ago:
Works like a charm. Thank you
Modify constructor code
By octav20071, with 2 replies.
Last reply by octav20071, 12 days ago:
I want to modify Greenfoot's constructor code, for MyWorld and actors, but where is the script located? I know what I'm doing, I only want to know what is the path to the text file.
If you want to modify the templates for when the classes are created, you can use any text editor finding the files at: greenfoot/lib/english/greenfoot/templates
alright, thank you very much!!
How can I add background music while the game is running?
By Pabloseb_, with 1 reply.
Replied to by Roshan123, 12 days ago:
can some correct this error plz
By divinity, with 5 replies.
Last reply by danpost, 13 days ago:
no valid values have been assigned those variables prior to the constructor calls.
Assign values to them prior to calling the constructors.
Why the iframe of my game not work?
By 23571113, with 2 replies.
Last reply by 23571113, 13 days ago:
Thanks! It woks pretty well now.
Animation with Image Arrays overriding each other
By BaseEvoli, with 2 replies.
Last reply by danpost, 19 days ago:
It is not easy to give advice here. On one hand, there is lag due to reading in multiple images during game time. On the other hand, there is a lot of memory used up if the images are loaded up front. However, that is what I think you should do -- load all the images into arrays when you create the character. With these field arrays, you can add one more field array for the one that is currently being used (by setting it equal to one of the others). Use only one timer for the current animation (along with the shot delay timer). You will also not need fields for frame counts (size of arra
By StndRed, with 7 replies.
Last reply by Super_Hippo, 21 days ago:
You can use the Color class provided by Greenfoot. It is very similar to java.awt.Color. You have to create an image, set the color and then use the drawString method to draw text with the given text color to the background. However, if the text on the image is everything you need, it might be enough to use another constructor for the GreenfootImage class. You can set the text color (‘forgreound’) directly. Check the API here:
By divinity, with 3 replies.
Last reply by danpost, 21 days ago:
Use "<AbstractButton>" in line 1 (instead of what you put).
Java Exception for my code in Greenfoot
By Freddy05, with 9 replies.
Last reply by RcCookie, 22 days ago:
How to prevent objects from pushing each other?
By BaseEvoli, with 1 reply.
Replied to by danpost, 22 days ago:
Here is the project,
Upload project here providing source codes.