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
removeObject troubles
By CreepZilla, with 5 replies.
Last reply by CreepZilla, almost 12 years ago:
yes that worked thanks :)
Missile Swerving
By GreenGoo, with no replies.
I have made a game where missiles randomly spawn and chase the mouse cursor. However, I want them to swerve away from each other if they come to close. How could I do this?
Exporting D:
By Draymothisk, with 3 replies.
Last reply by Draymothisk, almost 12 years ago:
Here's a link to download the .zip of my project. This version exported, but skipped the intro screen. http://ninjadonut.net/isGuyDownload.php By default, the game tries to open "worldOne", but it redirects it to "gameStartWorld". If you open "worldOne", you'll find that code in the constructor. Feel free to poke around. As this is my first game, I got a bit lazy after a month of working on it, so the code might get a tad sloppy.
Applet on Website; saving variables in mysql
By shoro2, with 1 reply.
Replied to by Gevater_Tod4711, almost 12 years ago:
I think the
java.sql Library
will be helpfull. But I also don't know exactly how to do it. You should try to find a tutorial using google.
How to get the object location(x,y)
By zuyi53, with 1 reply.
Replied to by davmac, almost 12 years ago:
Well, firstly, objects don't really have names. Also, getObjectsInRange returns a list of objects, not just an object. It's probably best if you post what code you have, then we can help you to make it work.
How do i end the game ?
By Nz-Tank, with 17 replies.
Last reply by Nz-Tank, almost 12 years ago:
AHA! it worked! thank you so much, you just helped me on a 150 point project that wouldve lost some points without an end. Thank you so much i appreciate the help here, i really do
Why won't this work?
By henrYoda, with 5 replies.
Last reply by MatheMagician, almost 12 years ago:
You're welcome!
Could someone please post the coding to stop the actors from entering into the walls?
By Blakehammond, with 1 reply.
Replied to by danpost, almost 12 years ago:
<Code Omitted>
need help with updating a score board
By sophia8123, with 2 replies.
Last reply by danpost, almost 12 years ago:
Line 58 should probably be: <Code Omitted>And I would have to assume that the 'updteStatus' method is declared with <Code Omitted>and that both 'score' and 'lives' are declared 'static' as well. If you are not using static methods and fields, then you need to get a reference to the statusboard object that you had created. Use <Code Omitted>
Jumping issues :(
By Draymothisk, with 5 replies.
Last reply by danpost, almost 12 years ago:
I am not sure why you have two seperate conditional checks to set 'canJump'. Maybe better would be <Code Omitted>
Holding down a key
By -nic-, with 5 replies.
Last reply by Game/maniac, almost 12 years ago:
Your welcome
Boolean
By Joorror, with 3 replies.
Last reply by Gevater_Tod4711, almost 12 years ago:
to just check you need to use the method getOneObjectAtOffset. I think the use of a parameter would be good in this case:
closing an image
By Abdi, with 7 replies.
Last reply by danpost, almost 12 years ago:
I am not too sure that you want it to be a subclass of mainmenu or just a subclass of Actor. Anyway, to add an actor into the world, use the World class method 'addObject'.
What coding is required to stop the player entering through the walls?
By Blakehammond, with 6 replies.
Last reply by danpost, almost 12 years ago:
If your walls are at least 4 pixels wide then you should be able to detect when you came upon one. After the 'checkKeys' call in the act method, add a 'checkWalls' method. Create the new 'checkWalls' method checking for intersecting walls (one check for each type of wall). If either wall is present, move the character back to the location it started at. You will have to add fields to hold the initial location and set them at the beginning of the act method.
Problem with getWidth()
By sopi, with 12 replies.
Last reply by davmac, almost 12 years ago:
But maybe someone could explain me why I always get a error by using the getWidth method.
getWidth used to be an Actor method in earlier versions of Greenfoot, but in recent versions it is not. You have to call getImage().getWidth() (or equivalent) instead.
867
868
869
870
871
872
873
X