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 Adding an Object
By rockon411, with 2 replies.
Last reply by rockon411, over 9 years ago:
THANKS! I really needed that!
Set actor as having no image
By Dylex, with 8 replies.
Last reply by Dylex, over 9 years ago:
I have other methods that require the exact coordinates of the lines at the boundaries of the box for line casting and stuff like that, might as well use them for collision detection. Additionally, i want it so that the colliders restrict the coordinates of the player, rather than stopping him from moving his own coordinates , which i thinking would be what would happen if i did use intersect() or anything like that. I need to be able to have more information that just whether the player touches another object.
No Exception Message
By rockon411, with 6 replies.
Last reply by rockon411, over 9 years ago:
Thanks I seem to be doing something incorrectly, however, because I changed <Code Omitted>to <Code Omitted>and when I try to compile it, I receive the error "cannot find symbol - method removeObject(Minnow)"
count a timer while an special actor is in the game
By Fifilein, with 20 replies.
Last reply by Fifilein, over 9 years ago:
Thank you very much no it works like it should!
Taking Turns
By rockon411, with 2 replies.
Last reply by rockon411, over 9 years ago:
Thanks!
Accessing getter method
By ironphoenix20, with 6 replies.
Last reply by danpost, over 9 years ago:
Make sure the class still has this for its first line: <Code Omitted>Another try would be to close and re-open greenfoot again.
Endscreen
By Malmi, with 2 replies.
Last reply by Malmi, over 9 years ago:
I will try it thx ;D(It worked)
Help!
By RaymondSun, with 2 replies.
Last reply by danpost, over 9 years ago:
Super_Hippo wrote...
Change the if's in lines 22 and 26 in the moneybad class to 'else if'. It shouldn't just stop but show you an error message (NullPointer Exception).
Actually, it would be an IllegalStateException. When moneybag touches thief (line 22) and moneybag is removed (line 24), the next thing attempted is 'getY()' (line 26) which cannot be 'null', but will cause an issue if the actor is not in the world (the illegal state of the actor when calling that method).
How do I change the Layer?
By 11870, with 7 replies.
Last reply by 11870, over 9 years ago:
Thanks! I got it to work.
HELP! Counter Problems
By salvo, with 14 replies.
Last reply by danpost, over 9 years ago:
Super_Hippo wrote...
and move line 19 to line 23.
This was said earlier about the class code. Actually, moving it down one line is enough. It is line 29 in the most recent code post that must be moved down (one line is sufficient).
How do you add objects that come onto the screen later in a moving background?
By Hamza_Abdulla03, with 4 replies.
Last reply by Super_Hippo, over 9 years ago:
Please use code tags, so you can say in which line you get your error. Change <Code Omitted>to <Code Omitted>
How do I move my enemies?
By 11870, with 4 replies.
Last reply by 11870, over 9 years ago:
Thanks! That worked!
Accessing Method in TestCase
By rockon411, with 5 replies.
Last reply by rockon411, over 9 years ago:
Thanks guys!
Cartesian Coordinates?
By Wasupmacuz, with 10 replies.
Last reply by Wasupmacuz, over 9 years ago:
danpost wrote...
Wasupmacuz wrote...
I'm still interested :P I come across this problem a lot in my scenarios. However, I already re-coded the class yesterday :/
Well, you will need both the following classes to extend everything from. The TransWorld class (for translating of world coordinates):
HealthBar creation
By ironphoenix20, with 31 replies.
Last reply by danpost, over 9 years ago:
ironphoenix20 wrote...
you mean i should take in a parameter for damage in the update method and change the values and image accordingly?
That is about right (if not spot on). The parameter does not necessarily have to be for damage only -- it can also be for healing as well. Using a method signature of 'public void adjustHealth(int amount)', a negative parameter value would be for damage and a positive one would be for healing. Just adjust the health value and call a private method to update the image.
373
374
375
376
377
378
379
X