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
Help with switching images
By programmer274, with 24 replies.
Last reply by programmer274, over 11 years ago:
yes google chrome
An interesting question!
By jabirfatah91, with 4 replies.
Last reply by jabirfatah91, over 11 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 11 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 11 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 11 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 11 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 11 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 11 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 11 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 11 years ago:
thanks limefortheworld
Problem with a controller
By zakariaonlyy, with 11 replies.
Last reply by Gevater_Tod4711, over 11 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 11 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.
calculating totals of cards flipped
By drpotts2000, with 2 replies.
Last reply by vonmeth, over 11 years ago:
It might need to look something like this. <Code Omitted> <Code Omitted> "total++" will simply increment the value of "total" by 1. It wou
score
By ndi_andi, with 3 replies.
Last reply by danpost, over 11 years ago:
When you want to create a scoreboard to display the top 5 scores (and the top nearest scores) insert the code <Code Omitted>You must first import the ScoreBoard class as described above.
Sharing variables between classes.
By Jrm1715, with 4 replies.
Last reply by Jrm1715, over 11 years ago:
But I see how your example is much neater and works exactly the same. I was having trouble coming up with a cleaner all-in one method but had difficulty.
902
903
904
905
906
907
908
X