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
Help with reading strings from file
By Asiantree, with 20 replies.
Last reply by danpost, over 8 years ago:
Well, (1) you know how to construct an 'if' block and (2) you can see what methods are available for any Actor by looking into the Actor class documentation and (3) you know what the act method is for (hopefully). So, you should be able to attempt something.
How to make an explosion animation
By AngelusNeko13, with 7 replies.
Last reply by AngelusNeko13, over 8 years ago:
And it might need a timer because they need to de-spawn quickly since its gonna animate and explosion and maybe a collision for a wrecked car
Engine for 2d game
By 11870, with 1 reply.
Replied to by AngelusNeko13, almost 9 years ago:
try PyGame
Need help with rotation an actor from the edge
By Asiantree, with 6 replies.
Last reply by danpost, almost 9 years ago:
Nosson1459 wrote...
I don't see why you need the exact(x/y) variables. You can remove everything that has to do with them and then change line 32 to: <Code Omitted>
Accuracy in position is lost due to rounding if you use that line. The way Asiantree is coding it looks to be correct for smooth movement.
Need help with reading in strings from a text file
By Asiantree, with 3 replies.
Last reply by Nosson1459, almost 9 years ago:
I think it would be simpler to have each value on a separate line then you can just do:
Need Help with Adding an Object
By rockon411, with 2 replies.
Last reply by rockon411, almost 9 years ago:
THANKS! I really needed that!
Set actor as having no image
By Dylex, with 8 replies.
Last reply by Dylex, almost 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, almost 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, almost 9 years ago:
Thank you very much no it works like it should!
Taking Turns
By rockon411, with 2 replies.
Last reply by rockon411, almost 9 years ago:
Thanks!
Accessing getter method
By ironphoenix20, with 6 replies.
Last reply by danpost, almost 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, almost 9 years ago:
I will try it thx ;D(It worked)
Help!
By RaymondSun, with 2 replies.
Last reply by danpost, almost 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, almost 9 years ago:
Thanks! I got it to work.
HELP! Counter Problems
By salvo, with 14 replies.
Last reply by danpost, almost 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).
371
372
373
374
375
376
377
X