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
Health Bar
By roccoricciardi, with 6 replies.
Last reply by davmac, over 13 years ago:
question: if i have one actor as a subclass to its counterpart, would they be storing their health value in the same location?
No, unless you declare the field as "static", but it's best not to do that if you can avoid it (it's bad from a design point of view). However, you can solve the problem by setting the health level of one actor at the same time as you create it from the other one.
Removing Actor and Replacing it with another
By roccoricciardi, with 11 replies.
Last reply by roccoricciardi, over 13 years ago:
problem fixed, now on to debugging issues with firing cannons -___-
Jumping
By roccoricciardi, with 2 replies.
Last reply by roccoricciardi, over 13 years ago:
thanks! only issue with that is that jumpCounter remains at 20 even after the key is released, so a second keyDown check such as the following is needed to reset the count so that the actor could jump later if(!(Greenfoot.isKeyDown("w"))) jumpCount=0;
Kinect Programming
By SnowRider04, with 4 replies.
Last reply by SnowRider04, over 13 years ago:
Ok thanks.
Chess Game - Movement?
By Cubez, with 13 replies.
Last reply by Transpire, over 13 years ago:
Um, I'm not too sure about what you're trying to do, but wouldn't it be better to create an abstract class "Piece" with declared GreenfootImage blackImage and whiteImage, and then in the constructor have a blackImage and a whiteImage parameter, this way with superclass constructor chaining you can ensure every Piece will have pictures? Then, whenever the piece is moved, check the color of the square it is moving it to (again, with a superclass method somewhat like this...
getHeight method
By tamigr, with 4 replies.
Last reply by tamigr, over 13 years ago:
Thanks!
Actor Falls Through World; Cartesian Coordinates
By Transpire, with 23 replies.
Last reply by davmac, over 13 years ago:
When I say array-like, I mean that it starts with 0.
Ok - the proper name for that is "0-based indexing" (as Java arrays use), though in this case the x/y values aren't really meant to be so much indexes as they are distances from the top left cell. Regardless we could say that the co-ordinates are "0-based".
Um, you mean bounded, right?
Yes, I meant bounded, sorry.
Mouse Movement
By vittorena, with 1 reply.
Replied to by vittorena, over 13 years ago:
Oh my god. Of course nothing happens because i didnt set stepsizex and stepsizey stepsizex = xway/steps; stepsizey = yway/steps;
Help
By aphillips, with 3 replies.
Last reply by JL235, over 13 years ago:
Np, there are also some other resources dotted about greenfoot.org for both beginners and advanced users.
Applet flicker problem (and solution) on Mac
By mik, with 1 reply.
Replied to by MathManiac, over 13 years ago:
Wow! I wonder if it works for Internet Explorer on windows...
Greenfoot not compiling
By Pink_Piranha, with no replies.
Ooops...Double post somehow... Sorry. :S
Help with this scenario!
By blakeesh, with 7 replies.
Last reply by Builderboy2005, over 13 years ago:
Yes, a very big difference. By saying <Code Omitted> you are saying "Get the world! do nothing with it. And then try to removeObjects" But only the world is able to remove objects, so you need to do this: <Code Omitted> which says "Get the world, and then *use* the world to remove this object" which is what you want
Mouse
By Almog, with 2 replies.
Last reply by Almog, over 13 years ago:
Oh... Thanks This exactlly what I need
ImageColors
By -Tigerkralle-, with 6 replies.
Last reply by -Tigerkralle-, over 13 years ago:
@kwill1429 Yes, I could... But then i would need 500 or more Wombat-Pictures... And I think, thats too mutch... @mik Thank you very much! :D
Passing on a trait to other objects of the same class
By mahimahi42, with 1 reply.
Replied to by mahimahi42, over 13 years ago:
Nevermind! I found my problem, and have since fixed it.
1049
1050
1051
1052
1053
1054
1055
X