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
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.
Can not find symbol - error message
By sanjayrajure, with 1 reply.
Replied to by danpost, over 6 years ago:
sanjayrajure wrote...
I am getting this error message while trying to run sample code from tutorials. <Image Omitted>
Cannot help without seeing the codes producing the error.
Find out if an integer has been defined
By Starlord_20, with 3 replies.
Last reply by danpost, over 6 years ago:
No worries. Your line 2 declares it as the primitive type,
int
, which automatically, by default, is assigned a value of zero. Side note: had you declared it as type
Integer
(which is an object reference type), only then would its default value be
null
,.
2D Aimbot
By Voly007, with no replies.
Ich würde gerne für mein Spiel eine künstliche Intelligenz einbauen, die den Spieler abschießt. Die Waffen und Spieler sind bereits im Spiel implementiert. Jedoch weiß ich nicht wie man ein 2D Aimbot programmiert. Hilfe wäre wirklich super! Danke I would like to incorporate artificial intelligence into my game that shoots the player down. The weapons and players are already implemented in the game. However, I don't know how to program a 2D aimbot. Help would be really great! Thank you
Ping Pong Game
By _kr_696, with 2 replies.
Last reply by _kr_696, over 6 years ago:
I've only made the bats and the ball. I have the ball moving and I can move the bats with the keyboard.
148
149
150
151
152
153
154
X