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
Access to Actor
By Hutanoi, with 2 replies.
Last reply by Hutanoi, over 12 years ago:
thanks :)
NullPointerException when calling a method from another class
By Phiesel, with 4 replies.
Last reply by Phiesel, over 12 years ago:
Ah, I understand. Thanks again!
Ending the game at zero lives
By Svek, with 1 reply.
Replied to by danpost, over 12 years ago:
In the 'if(isTouching(Player.class))' block, after line 7, you need to ask 'if the "new" current value of the life counter is zero, set a new end game world as the active world'.
Collision response
By Kartoffelbrot, with 4 replies.
Last reply by Kartoffelbrot, over 12 years ago:
I sent you an invitation for the demo project via Dropbox. Thanks for help!
I don't know why this doesn't work....
By Meinersjee, with 12 replies.
Last reply by danpost, over 12 years ago:
It should work as good as your original. Line 1: sets 'x' to 0 for 'q', 1 for 'w', 2 for 'e' and 3 for 'r'. If none of these keys are detected, then it sets x to -1. Line 2: exits the method if none of the four keys were detected. Line 4: same as lines 15, 36, 53, and 70 of your code above. The rest: same as your blocks for the different keys. I just used the value of 'x' instead of hard-coding '0', '1', '2' and '3' where needed. This should not alter the way the code works in any way and probably will not fix your problem (which I presume resides elsewhere in your code). Maybe yo
add object if it doesnt exist
By davemib123, with 6 replies.
Last reply by davemib123, over 12 years ago:
Thanks guys. I did it like this: <Code Omitted>
How do i make a random number generator for the pipes in flappy bird
By Curly, with 1 reply.
Replied to by danpost, over 12 years ago:
The Greenfoot class API contains a 'getRandomNumber(int)' method that you can use to get a number from 0 to 'int n'-1. Please refer to the API for more info.
Image Color
By Hutanoi, with 3 replies.
Last reply by danpost, over 12 years ago:
You need to set the drawing color BEFORE drawing the String text on the image.
How can I adjust Greenfoot itself?
By Upupzealot, with 9 replies.
Last reply by davmac, over 12 years ago:
And what is the full name of "ibsp"?
"Incremental Binary Space Partition". The tree is not re-built from scratch each time an actor moves, but rather adjusted incrementally.
Download old scenario
By joeschmoe, with 5 replies.
Last reply by joeschmoe, over 12 years ago:
oh nevermind, I got it! thanks for your help! I needed to put in "/applet_attachments/0002/2064/greenfoot2944599267081925210.jar"
Publish Scenario
By gnvrajareddy, with 1 reply.
Replied to by lordhershey, over 12 years ago:
I have never seen that happen. If you are using the same computer to develop on as you had to make this post I could not see why the host name resolution would fail.
How many elements of a specific value in an array
By wockrad, with 1 reply.
Replied to by lordhershey, over 12 years ago:
If the array is sorted you can use a binary search to find one of the instances of the '3', then you just count up and down until you hit non-3's There will be a linear element to this and your worst case running is big O of n. If you could make you array a giant string then you could use regular expressions to find all instances of a pattern, but that would take a lot longer than the first method. You could also do this, go through the array, enter the numbers as keys in a hash table, have the value being the number of times it was seen. Then you can query the hash table (HashMap) when ever y
Text appear by pressing a button
By CaptainMorgan, with no replies.
I need to make the question then the answer appear when I press space but I'm not sure what the code is and I can't find it. Help? <Code Omitted>That's all the code I've got.
getWorld.addObject... help???
By CaptainMorgan, with 2 replies.
Last reply by CaptainMorgan, over 12 years ago:
I got replaced getWorld and forgot to change it back, but yeah thanks. It works now
rotating image is broken?
By vtn2@calvin.edu, with 3 replies.
Last reply by davmac, over 12 years ago:
Huh... those image links didn't seem to work
The problem is that you linked to the imgur page for the image, and not to the image itself. The correct URLs are: http://i.imgur.com/aJlKvIC.png http://i.imgur.com/72h1Mea.png Which look like this: <Image Omitted> and <Image Omitted>
671
672
673
674
675
676
677
X