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
Dance game notes not being removed
By Beaver, with 15 replies.
Last reply by Beaver, over 3 years ago:
Actually, I tried the boolean method a few more times, made the hitbox a bit thinner and I can finally say that it works. Thanks for the help :)
Java assignment
By Roshan123, with 3 replies.
Last reply by danpost, over 3 years ago:
Roshan123 wrote...
i m not able to get the required answers. Would u plz
only
tell me the answer of 2 and 5 number...plz
2 is vague as only things really needed are boolean loop control and code block. 5 deals with
while
and
do-while
difference (discussed in tutorial).
Problem with getKey()
By Turbo_Thorsten, with 14 replies.
Last reply by danpost, over 3 years ago:
Super_Hippo wrote...
Maybe your k key is broken?
Try a different key, like "a" (for
a
utomove).
How long does it take for code to run?
By Gabe1098, with 5 replies.
Last reply by Gabe1098, over 3 years ago:
danpost wrote...
In your code above, the ONLY thing that may cause a delay is something stemming from "
new Spider()
", which executes "
public Spider()
" in your
Spider
class. Hence, why I asked for its codes.
Ohhh Thanks!
Big problems with Actor not in World
By Turbo_Thorsten, with 7 replies.
Last reply by danpost, over 3 years ago:
Turbo_Thorsten wrote...
Ok so now I got the problem again. What's wrong with my code?
If
lookForBullet
removes tumor from world,
lookForPlayer
, which requires the tumor to be in world, fails. Add as first line in
lookForPlayer
: <Code Omitted>
setImage
By Gabe1098, with 7 replies.
Last reply by Gabe1098, over 3 years ago:
Gbasire wrote...
I just realised I did some typo errors in my previous message, sorry here are the correct lines of code : <Code Omitted>and <Code Omitted>be sure you also use the correct capitalization, the file must be "Banana.png" with a capital B
yes I noticed that and I fixed it I will see if it fixes tomorrow
How to read and use a text file?
By Darkstep, with 8 replies.
Last reply by RcCookie, over 3 years ago:
Just put it into a try/catch block like the other times and catch an IOException.
Or
expand the existing one: <Code Omitted>Also it’s fine, feel free
How do I stop my actor(Fbot) from passing through the walls?
By anderslieww, with 8 replies.
Last reply by RcCookie, over 3 years ago:
If your walls are stationary, this should work: <Code Omitted>
i want top score ,i used static variable to store problem
By venkatesh438, with 2 replies.
Last reply by venkatesh438, over 3 years ago:
thanks bro
Problem with getting a variable
By Turbo_Thorsten, with 8 replies.
Last reply by danpost, over 3 years ago:
Try this for line 34: <Code Omitted>
Power Up Problem
By Gabe1098, with 1 reply.
Replied to by Gabe1098, over 3 years ago:
of I updated it
Boolean and Return
By Gabe1098, with 2 replies.
Last reply by Gabe1098, over 3 years ago:
danpost wrote...
Gabe1098 wrote...
hello I am very new to greenfoot and I have been doing discussions a lot lately so can you please do a simple explanation about boolean and return
Boolean: the
boolean
data type has only two possible values:
true
and
false
. Use this data type for simple flags that track true/false conditions. Return: the
return
statement is used to immediately exit a method. In a method whose return type is declared
void
, it is used to force an immediate exit so that the following lines of code in the method do not execute. In a
Character movement
By Shinnaru, with 2 replies.
Last reply by Shinnaru, over 3 years ago:
Works now, I just noticed I had a method checkWall() which prevents my character from touching and/or going through the wall, so the if statement(Line 12) was not running.
How do I check after all of an actor is gone, then print "GameOver"
By anderslieww, with 3 replies.
Last reply by anderslieww, over 3 years ago:
Thanks it worked! :)
VARIOUS
By ronald, with 44 replies.
Last reply by ronald, over 3 years ago:
thank you
59
60
61
62
63
64
65
X