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
Need help with Variables
By Happycrusher764, with 5 replies.
Last reply by Happycrusher764, over 6 years ago:
It says variable not found
java.lang.OutOfMemoryError: Java heap space
By footpickle, with 1 reply.
Replied to by footpickle, over 6 years ago:
nevermind
How to properly use setImage?
By footpickle, with 34 replies.
Last reply by footpickle, over 6 years ago:
Also, how would I get a value from one actor to another? I'm trying to make a counter that saves the data over multiple worlds, but I couldn't figure out how so I made a new counter and tried to get the first counter's data, but it didn't work. How do I get the value from Counter to Counter2?
Making a random enemy move back and forth while still punching?
By yko1, with 2 replies.
Last reply by yko1, over 6 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 6 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 6 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 6 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 6 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 6 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 6 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 6 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 6 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 6 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 6 years ago:
can you show me an example in the source code?
142
143
144
145
146
147
148
X