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
removing an actor after being hit by another actor for 3 times
By bangtan, with 10 replies.
Last reply by danpost, about 6 years ago:
Show complete class codes.
How can I horizontally flip a gif?
By CieloMungcal, with 2 replies.
Last reply by CieloMungcal, about 6 years ago:
thanks! i made two complete set of images
How can I make object disappear after it gets hit?
By teesore, with 1 reply.
Replied to by bangtan, about 6 years ago:
<Code Omitted>
How can i make my actor stay on platforms?
By YothMan, with 7 replies.
Last reply by YothMan, about 6 years ago:
CieloMungcal wrote...
private int vSpeed = 0; private int acceleration = 1; private int jumpHeight = -8; //makes actor jump if(Greenfoot.isKeyDown("up")) { vSpeed = jumpHeight; fall(); } //checks if standing on land boolean onGround() { Actor under = getOneObjectAtOffset(0, getImage().getHeight()/2, land.class); return under != null; } public void checkFalling() { if (onGround() == false) { fall(); } } //falling private void fall()
I don't know why it won't print... please assist
By ThatAsianPixel, with 8 replies.
Last reply by Blazer, about 6 years ago:
You could, alternatively, have a general class that extends
Actor
, from which
Blastoise
,
Charizard
, and
Venusaur
extend from. Then add instances of those classes to a
Cpu
class and a
Player
class. Doing so, subclasses of that general class can inherit methods from that general class. You could also override a method by using the naming the method with the same name. (subclasses are classes that extend another class. This other class is called a superclass, in case you didn't know :D) Less messier when implementing changes to your code
My game doesn't work online
By footpickle, with 2 replies.
Last reply by footpickle, about 6 years ago:
I did do that. I don't see the problem
How do I make an object stay on top of another object or a platform?
By CieloMungcal, with 13 replies.
Last reply by Blazer, about 6 years ago:
GreenfootImage is not an actor, unless your healthbar class extends GreenfootImage, it will not work Try using this: <Code Omitted>
.jar file window size
By Carbon_Raven, with 4 replies.
Last reply by Carbon_Raven, about 6 years ago:
i meant to run the jar file... I doubt that your idea is working...
Font of text
By pavolbiacko2002, with 5 replies.
Last reply by pavolbiacko2002, about 6 years ago:
Thank you very much! ;)
How do I make a damage using a player to another player?
By CieloMungcal, with 7 replies.
Last reply by danpost, about 6 years ago:
CieloMungcal wrote...
whenever 'slash' hits my hero.. game stops saying theres an error
Insert as 2nd line in act: <Code Omitted>
How do I check if there is already a bomb object?
By BigBoy123, with 1 reply.
Replied to by danpost, about 6 years ago:
Use: <Code Omitted>
null pointer exception
By yeeterboi420, with 2 replies.
Last reply by danpost, about 6 years ago:
Is it possible the actor is not in the world when this code is executed (that is,
getWorld()
is returning a null value)?
starting location - rover scenario
By derklenemo, with 1 reply.
Replied to by danpost, about 6 years ago:
vvv Does this do what you want vvv? <Code Omitted>
how to make a solid object that a player can touch?
By footpickle, with 5 replies.
Last reply by danpost, about 6 years ago:
footpickle wrote...
I don't understand.
Go to and run the linked scenario. Then, click the
Who
button to view the class code of the "player".
How To Remember The Value?
By pavolbiacko2002, with 3 replies.
Last reply by pavolbiacko2002, about 6 years ago:
Ok thank you i will try it
139
140
141
142
143
144
145
X