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
A code to wait for 10 seconds then proceed to the next code
By loxtn10, with 4 replies.
Last reply by loxtn10, over 9 years ago:
Oh I get it now, so that's what the 550 is for. thanks a lot I get it now, I have another problem but this one is over, the other is here http://www.greenfoot.org/topics/56978/0#post_108166 would llove your support, your comments are pure aids thanks a lot.
Why Greenfoot.delay() is not working?
By angelol, with 1 reply.
Replied to by danpost, over 9 years ago:
It may be that your 'else' condition never evaluates to 'true'. This is because of the String comparisons which will always be false. The literal "a", for example, is equivalent to 'new String("a")' and that newly created String object is not the same object as what could possibly be referenced in 'unu' or 'duan'. Use the 'equals' method to compare the contents of the String objects instead of comparing the objects themselves:, similar to the following: <Code Omitted>
life counter problem
By christ, with 1 reply.
Replied to by danpost, over 9 years ago:
christ wrote...
i am trying to make the Tank actor lose a life when it hits the enemy actor. when it reaches 0 lives it should disappear. Therefore it should take 3 separate hits from the enemy for the tank to die; not 1 !, for some reason the code doesn't work and I think when the enemy touches the actor it takes 3 lives away immediately
It is not that it takes 3 lives away immediately. It is taking one life at a time for 3 consecutive act cycles. This is because the enemy continues to touch the tank for a considerable length of time (computer-wise, 3 act cycles is about 0.055 second
terminal window
By pennycollecter1, with 2 replies.
Last reply by pennycollecter1, over 9 years ago:
thanks i figured out the problem about 4 hours ago but thanks for the help anyways
How do you get a bullet to fire in the direction that the gun is pointing?
By ScratchMan, with 25 replies.
Last reply by Super_Hippo, over 9 years ago:
Click on "Discuss" and write a text into the "Start a Discussion" field (and the field below) to start a new discussion.
aim at mouse
By christ, with 3 replies.
Last reply by danpost, over 9 years ago:
christ wrote...
I need to figure out how to make the background scroll as the character moves and I have no clue, could you help me in any way?
See
this
discussion.
Scenarios from the learning book
By Cheiron3000, with 2 replies.
Last reply by Cheiron3000, over 9 years ago:
ok, semms I oversaw this... thank you anyway
Baru masuk
By yudi, with 1 reply.
Replied to by danpost, over 9 years ago:
yudi wrote...
bingun... memulainya bagaimana ya?
English ... please.
trying to make a snake game
By wahaj, with 3 replies.
Last reply by Denver005, over 9 years ago:
can i have your codes for my project please reply
How to pause a single actor
By AuroraGamer, with 2 replies.
Last reply by AuroraGamer, over 9 years ago:
Thanks, that worked
Making an actor eat
By Greenfootnoob, with 5 replies.
Last reply by handfive, over 9 years ago:
Thank you very much!
fade issue
By davemib123, with 3 replies.
Last reply by davemib123, over 9 years ago:
yea that worked! Thank you.
Movement bug
By eddyfairf, with 1 reply.
Replied to by danpost, over 9 years ago:
You probably cleared the background image of the world, or have some transparent areas within the image used. You might try, instead of setting the background image, drawing the background image on the initial one: <Code Omitted>
i keep on getting class interface,or enum expected
By sharktank, with 1 reply.
Replied to by danpost, over 9 years ago:
The second line in your code is misplaced. It should be in the incorrectly named 'actFireOnCommand' method, inside the 'if' block as the first or second line there. The compiler does not expect to find that line where you had it and throws the error as a result (the only thing allowed outside the class code are import statements).
Color Detection
By Wolfpack9, with 4 replies.
Last reply by danpost, over 9 years ago:
You do not, and should not, declare the types of parameters when calling a method (your variables are already declared; you do not want to create new, uninitialized, ones). Also, the return type of the 'getColorAt' method is not an 'int' value, but an object of type Color. The line should be: <Code Omitted>This declares a variable (object reference) of type 'Color' named 'color' and assigns it a Color object representing the color at (fds, zxc) in the current image of 'this' object (an object of the class the code is located in). Now, I get th
446
447
448
449
450
451
452
X