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
Problem with boolean
By JasonZhu, with 2 replies.
Last reply by JasonZhu, almost 13 years ago:
Oh heavens, thanks so much. My coding life is just mixed with so many little mistakes.
tutorials
By thetoaster, with 3 replies.
Last reply by Crazunitic, almost 13 years ago:
"Cannot find symbol - class Platform"
:L Im no coding/Greenfoot expert.....that's why I look up things like this, but no matter how I tweak the code
I can't find out how to correctly define this class
Actor Not In World
By cruelrabbit, with 6 replies.
Last reply by davmac, almost 13 years ago:
I tried moving line 12 so that it is the first line in 'act' but to no avail.
Well of course not! Look at your code: <Code Omitted> You need to check if the object has been removed
between
those two method calls. If you check before the hitPlayer method, the object is always still in the world and so the check has no effect. If you check after the hitEdges method, it's too late.
End of World
By Aceman, with 2 replies.
Last reply by Aceman, almost 13 years ago:
Thank you <3 It helped me alot!
color class
By daksouku, with 1 reply.
Replied to by bourne, almost 13 years ago:
http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/Color.html
Can objects turn into other objects?
By Aermus, with 3 replies.
Last reply by davmac, almost 13 years ago:
You can't change the class of an existing object, but you have some other options:
remove the Car object and replace it with a StolenCar
Do not use two classes, and use logic in the Car to behave different depending on whether it is stolen or not. A boolean field can track whether the car is stolen.
AddObject by mouseclicking
By Tioma7, with 20 replies.
Last reply by Tioma7, almost 13 years ago:
danpost wrote...
The main problem is that line 68 should be up with line 3. Where it is now, it will not retain a value between method calls. Outside the method, it will retain its value. I have tried to create code for what you want to do, but have not as yet been able to do so with full control of the value of the field. I think the problem has to do with the click counting within the MouseInfo class. The fact that there is not always a one-to-one ratio in the detection of presses and clicks. The best I have been able to come to so far is using the following:
Checking if the game is running locally or online
By Sniper, with 1 reply.
Replied to by bourne, almost 13 years ago:
davmac wrote...
<Code Omitted>
Help
By tartags11, with 1 reply.
Replied to by Yogibaer, almost 13 years ago:
hallo tartags11, you declare the variable "value"
within
the act-method and
within
the bet()-method. In this moment eachtime the value of "value" is set to sero. I believe this is not what you want. Declare singing variables outside and try again. greetings from Yogibaer
Help with this Code!!
By tartags11, with 5 replies.
Last reply by tartags11, almost 13 years ago:
Put this in your world: <Code Omitted> I recommend using a counter to keep score. If you are using something else, then just
Health in pictures
By Tioma7, with 14 replies.
Last reply by Tioma7, almost 13 years ago:
danpost wrote...
The main problem that I see is in your 'getDigit' method. You have it receiving an image and a single-digit int value. The method sets the image to a new image, which removes any image you previously gave it, and then the method is exited, which loses the image change altogether. I do not think you realize that the image received by the method becomes local to the method and no longer is linked in any way to the image created by the calling method (the field itself is not passed to the method, just its value). Therefore, you will need to pass the new image back to the calli
Moving from World to World (i.e. through a door)
By askgriff, with 9 replies.
Last reply by danpost, almost 13 years ago:
It is
here
.
Up and down arrows increase and decrease speed
By LugNut29, with 4 replies.
Last reply by LugNut29, almost 13 years ago:
Ha..Yeah I'm very, very green to programming. I have been playing around with this a little and it seems to work about 90% of the time. When the fish gets in a corner, it seems that the up and down keys quit working. I'm sorry if I'm asking a lot of questions.
Bullet collision problem
By Tioma7, with 11 replies.
Last reply by Tioma7, almost 13 years ago:
i solved that, had to add that if bullets hits enemy loop stops
asteroids Score Board
By taky123, with 25 replies.
Last reply by taky123, almost 13 years ago:
OMG thanks it works your a life savior dude i dont know how to thank you :D
775
776
777
778
779
780
781
X