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
check for value
By Starlord_20, with 1 reply.
Replied to by danpost, over 6 years ago:
Use a
boolean
flag. Initialize it before, test while inside (changing its value if
random
is 1) and check its value after the
while
loop to do whatever when 1 hits.
Ping Pong Game
By _kr_696, with 7 replies.
Last reply by _kr_696, over 6 years ago:
now I need to make a score counter I have this so far. I don't know what else to do.
Ping Pong Game
By _kr_696, with 2 replies.
Last reply by danpost, over 6 years ago:
_kr_696 wrote...
Need help making boundaries in pong. I'm really new to coding.
A simple breakdown of pong ball boundary codes would be like: <Code Omitted>
NullPointerException
By Balu, with 2 replies.
Last reply by Balu, over 6 years ago:
I solved the problem! I changed something in the counter class and it dident work anymore, so i copy and pasted everything in to a new scenario and it worked! But thank you for your response!
End Game
By vikki, with 1 reply.
Replied to by danpost, over 6 years ago:
vikki wrote...
i want my game to end after all crabs have been eaten, but i dont know what the code is, and where to place it. please help!
Add an
act
method to your
World
subclass (
MyWorld
) and go to end when no crabs are in world.
how do I make a trail follow an actor?
By TakedaYeet, with 1 reply.
Replied to by danpost, over 6 years ago:
TakedaYeet wrote...
im making a car game and i want a trail of train tracks to follow to car, then disappear after a few seconds. PLEASE HELP!!!
The tracks in my
Tank Target Practice
scenario are similar to what you want. The Track class codes may be something you might want to review. You can access them by logging in and playing (or just let yourself lose by letting 5 target appear and disappear without shooting at them); upon game over, a statistics screen will appear with code-viewing buttons along the bottom.
Exception in Thread and ArrayIndexOutOfBoundsException
By minetruck, with 1 reply.
Replied to by nccb, over 6 years ago:
This looks like a problem in our MP3 library while it is trying to play that file. I would try converting the file to WAV in a program like Audacity, then see if using the WAV instead fixes the problem.
NullPointerException
By realsaifalrawie, with 2 replies.
Last reply by danpost, over 6 years ago:
realsaifalrawie wrote...
line 7 of the tie fighter code
I will presume that nothing is ever assigned to
tieenemy
(that which is to be removed). At any rate, you can instead use the
removeTouching
method to remove that actor.
Gibt es einen "Folgen"-Befehl
By J-T_Player_Programmiert, with no replies.
Gibt es einen Befehl dass einem etwas z.B. einem Auto ein Anhänger folgt sobald man ihn berührt hat?
How do i make my character shoot?
By k747, with 1 reply.
Replied to by danpost, over 6 years ago:
k747 wrote...
i can make it move but i want it to shoot
Post is lacking context, details and attempted codes.
IllegalStateException
By realsaifalrawie, with 3 replies.
Last reply by realsaifalrawie, over 6 years ago:
thanks!! youre a genius ;D
HOW DO I MAKE MY CHARACHTER MOVE?
By k747, with 8 replies.
Last reply by k747, over 6 years ago:
i think i've figured it out
NullPointerException Help
By LostInBinary, with 1 reply.
Replied to by Super_Hippo, over 6 years ago:
Maybe they return the correct value, but the returned values are not used anywhere. You could replace “int” in lines 51 and 56 with “void” and remove lines 53 and 58. And remove “List” in lines 53 and 58. Or (!) you change the “rneighbours” and “neighbours” in line 66 to “getredNeighbours()” and “getallNeighbours()”. And remove lines 64 and 65.
for simbabwe
By SanjiNaha, with 1 reply.
Replied to by k747, over 6 years ago:
Thx Simbawe
Ping Pong Game
By _kr_696, with 4 replies.
Last reply by _kr_696, over 6 years ago:
nevermind I haven't gotten to the counter. I need to make the left and right boundaries so the ball disappears, but I don't know how to.
148
149
150
151
152
153
154
X