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
Making a random enemy move back and forth while still punching?
By yko1, with 2 replies.
Last reply by yko1, over 5 years ago:
Yes, I expected that there would be random things in my code...I'm not quite sure what I am doing. The true or false values were so that if the Bully touched the MainKid, it would move back (after performing punch, which I did not add yet), and then it would go to the start point and then the value would change and it would start over. The moveBack method was kind of a test to see if the Bully would move back (I did not set the values yet). I ran the time for the punchMain because I wanted there to be a delay so that the Bully did not get any more extra hits than 1, if that is correct. I under
I need a bit of help
By ThatAsianPixel, with 1 reply.
Replied to by danpost, over 5 years ago:
ThatAsianPixel wrote...
I think I got something wrong with the ms.getMoveset.size() << Code Omitted >>
You have yet to create an
ArrayList
object in your
Moveset
class (line 3 by default is assigned a
null
value).
Int between worlds
By Yoshi21137, with no replies.
I have an int in one of my worlds and I want to call it from another world The code I want to use it in is <Code Omitted> That code is in a different world to the int
Help!
By Muurc, with 1 reply.
Replied to by danpost, over 5 years ago:
Muurc wrote...
I want a driving object to drive on a button which activates a bomb which explodes. When the bomb explodes, all objects around the bomb have be destroyed and removed from the world. I managed to get the bomb activated. The only problem is, that I don't know how to get the bomb to remove objects around it only when the driving object hits the button. In my case the bomb immediately removes the objects before everything else start to move. I have to teach the bomb to remove the objects only when the button is hit.
You can add an
addedToWorld
method for the bombs. It
HELPP!!!
By IMARCUS, with 2 replies.
Last reply by danpost, over 5 years ago:
IMARCUS wrote...
I'm getting an error on line 35
What is the error you are getting? (copy/paste in entirety)
java.lang.NullPointerException problems
By Yoshi21137, with 6 replies.
Last reply by danpost, over 5 years ago:
Then, you can remove line 1 in your previous posts. The first line in act can be removed, as well. Also, when it dies, it should remove the health bar from the world, too (first).
scoreboard problem
By Hinokami, with 12 replies.
Last reply by Hinokami, over 5 years ago:
i've asked my teacher about it, it is fixed now thank you
How do i use an if statement to check if a method has been called?
By footpickle, with 10 replies.
Last reply by footpickle, over 5 years ago:
Just realised I had no brackets in my If statement... Whoops.
How to add an object to a different world from an Actor class?
By ThatAsianPixel, with 7 replies.
Last reply by danpost, over 5 years ago:
Maybe have a
static Actor selectedActor
field in the
BattlePage
class and have the
BattlePage
constructor add the actor into its world.
How do I respawn things
By Cris______, with 1 reply.
Replied to by danpost, over 5 years ago:
First, line 1 in the deleting code uses an "isAtEdge(int)" call. What is that? Second, it appears you are using
static
values in your
MyWorld
class that should probably not be
static
. Third, initializing the world values should be done in the world constructor. Once moved, you can use the
run
method to respawn balloons. Forth, line 3 of the
run
method may generate a random value for zero balloons, which would basically leave the scenario in limbo.
Score Counter
By hr17_, with 5 replies.
Last reply by danpost, over 5 years ago:
I think line 32 is the problem (which follows line 31 -- see what it does).
Spawn with a time delay
By hr17_, with 2 replies.
Last reply by hr17_, over 5 years ago:
can you show me an example in the source code?
2048 merge error?
By whattheheck, with 2 replies.
Last reply by whattheheck, over 5 years ago:
Adding the displayValue function doesn't seem to fix the issue. It seems like when squares merge, they get stuck in place
My Code LØØps?
By DecentRug03, with 4 replies.
Last reply by danpost, over 5 years ago:
DecentRug03 wrote...
But I need to have a while loop in there.
Why?
DanPost I challenge you to make a game for me.
By popo88, with 2 replies.
Last reply by danpost, over 5 years ago:
popo88 wrote...
Some kid said that you are the best and now I am now challenging you to make the best game using greenfoot.
I doubt the kid meant that I was the best in the game development department. See my
Games by danpost
collection to see what I mean.
140
141
142
143
144
145
146
X