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
Mutliple random placements
By Wavesludge, with 29 replies.
Last reply by Wavesludge, over 12 years ago:
Thanks!
Title screen won't run
By HadAWay, with 2 replies.
Last reply by danpost, over 12 years ago:
Look closely at lines 190 and 191. Ask yourself, "What will be happening here?"; "Will this do what I need it to do?". By the way, 'removeObject' will not 'error' if the object is
not
in the world.
Unreachable statement?
By programmer274, with 13 replies.
Last reply by danpost, over 12 years ago:
'int' code breakdown: <Code Omitted>Line 2 add an instance of that variable to all objects created within this class. Therefore any Enemy object created will have its very own variable to control the rate of damage. Line 4 runs the delay, if it is being used. If the delay time has expired, its value
Help with switching images
By programmer274, with 24 replies.
Last reply by programmer274, over 12 years ago:
yes google chrome
An interesting question!
By jabirfatah91, with 4 replies.
Last reply by jabirfatah91, over 12 years ago:
Danpost! Please have a look at my discussion I created recently. I always expect great help from you. I want to use the existing code I copied+pasted there, but I want to avoid using the Greenfoot library function getNeighbours(…) in the Actor class. Then how to edit the exixting code? i will be very grateful to you with instant response!
My discussion.
How to make a scrolling background wall
By KierTulp, with 6 replies.
Last reply by KierTulp, over 12 years ago:
I just looked back at what I send earlier and i see that i havn't been clear enough, my actual problem is that when i keep the right key pressed, my player will stop, but the background will keep scrolling. I am looking for a way to make the background stop scrolling when my player hits a wall. thanks for the second tip btw, I was not really sure on how to make levels yet, altho I am not yet making levels with that tactic it will all go a lot easier!
Switching images (creating a menu)
By TisLars, with 7 replies.
Last reply by danpost, over 12 years ago:
Just to let you know, as an alternative (and this makes the coding even more simplistic): you could have the following:
Exception in thread "Thread-187" java.lang.IllegalArgumentException: image == null!
By QuestionMark, with 1 reply.
Replied to by danpost, over 12 years ago:
I have a feeling that it is not locating the splashscreen image on the site. Remove the import and see if it uploads then.
IllegalStateException :(
By Stormtrooper299, with 3 replies.
Last reply by vonmeth, over 12 years ago:
It exits out of the act() method.
Here
is more information in ways 'return' is used.
Can anyone help me code a Goldfish game?
By TristinAubin, with 1 reply.
Replied to by vonmeth, over 12 years ago:
playLoop() should work fine.
Another
topic
that has a code example.
How to have more than one key being used at once?
By bbwf, with 5 replies.
Last reply by vonmeth, over 12 years ago:
Like danpost posted above, you can remove the following from the act method in your bullet code as well (it is already done in the constructor). <Code Omitted> So the bullet fires off fine when you are not moving? I don't see why it wouldn't work while moving.
Replacing Worlds
By bbwf, with 1 reply.
Replied to by danpost, over 12 years ago:
In whatever method is called when the camel dies due to the Aligator hitting it (or at that point in the code), add the following (I am calling your player 2 world 'P2World'): <Code Omitted>
updating
By lildiddyk, with 3 replies.
Last reply by lildiddyk, over 12 years ago:
thanks limefortheworld
Problem with a controller
By zakariaonlyy, with 11 replies.
Last reply by Gevater_Tod4711, over 12 years ago:
oh right. you have to use the name of the array (in this case array) if you want to get one of the fields. thank you vonmeth.
Array in userinfo?
By erdelf, with 3 replies.
Last reply by danpost, over 12 years ago:
You have available to you 5 Strings of 50 characters each. You can store your 'char' array as a String in one of those. You would still have 200 characters of String space available; plus the other 40 characters of the String you just saved 10 characters in, if you concatenate to save and use substrings to split it back up.
912
913
914
915
916
917
918
X