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
Remove object if it hits the line
By Milad, with 9 replies.
Last reply by Milad, over 6 years ago:
thank you it worked
Tic Tac Toe
By ItzTigerr, with 2 replies.
Last reply by lehrerfreund, over 6 years ago:
If you mean your world should be just a 3x3 grid you could just adjust this in the World-class: <Code Omitted> This means that your world is consisting of 3x3 cells, every cell is 200x200 pixels (so the width of your world actually is 600px - 3 cells a 200 px).. You can set your marks with something like <Code Omitted> This sets a mark into the middle cell, as you start counting cells with 0: 0/0 1/0 2/0 1/0 1/1 1
need help
By Starlord_20, with no replies.
<Code Omitted> in my little game, I want the player play against the computer. After every round the total is added together, but if your random number is 1, the currend round isn`t counted. The Game lasts until the required count of rounds (int a) is reached. my problem: the output of the total (int summe1 and int summe2) doesn`t work...
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
148
149
150
151
152
153
154
X