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
Minigame Code Assistance Needed
By pokemunn, with 3 replies.
Last reply by pokemunn, over 11 years ago:
Thank you danpost, this helps me out a lot. :)
Universal Array
By KenCo, with 8 replies.
Last reply by KenCo, over 11 years ago:
Thank you helpers, you input aided me to see what I really wanted to achieve and have now solved my problem.
Issue with enemy knockback
By K_wow, with 13 replies.
Last reply by K_wow, over 11 years ago:
Ah, I see.
Timer issues
By GreenGoo, with 2 replies.
Last reply by GreenGoo, over 11 years ago:
Okay thanks, I'll keep that in mind.
Anyone going to TGS?
By GreenGoo, with 4 replies.
Last reply by potemtial, over 11 years ago:
Sorry, I should have been clearer, I am currently with a friend, we are both going to tgs
How do you open a new scenario in Greenfoot?
By kthompson, with 1 reply.
Replied to by danpost, over 11 years ago:
Greenfoot will open two types of files. When it opens a GFAR file, which is basically a zip folder, it creates a file folder with the unzipped files in it. This file folder is the other type of file greenfoot will open. So, if you do not yet have a file folder that is a lobster and crab game scenario folder, then open the GFAR file with greenfoot. If you just downloaded greenfoot, you may not be able to work or open the scenarios until you move or copy the scenarios folder to some place like in the 'My Documents' folder (you need write permission in the folder to open the scenarios from)
Endlosschleife Bewegen
By Asoraso, with 5 replies.
Last reply by Asoraso, over 11 years ago:
Danke, werde es ausprobieren sobald ich Zeit habe.
Line breaks in documentation
By jimboweb, with 2 replies.
Last reply by jimboweb, over 11 years ago:
Ha! Thanks, DanPost, I just figured out that it's HTML. Don't know why that didn't occur to me.
Re Universal Array
By KenCo, with 3 replies.
Last reply by danpost, over 11 years ago:
Then just move it into the Marker class where it will be accessible to it and all its subclasses. Make the array a 'static' one so the objects created from its subclasses all share the same array and are not given individual arrays to work with: <Code Omitted>If you only want the array accessible to the Marker class and its subclasses (that is, you do not want any other classes to have access), then use: <Code Omitted>
how to connect to mysql
By jdc10, with no replies.
database
NullPointer exception!
By K_wow, with 4 replies.
Last reply by K_wow, over 11 years ago:
Nope, that didn't work. Ok... It turns out I spelt addedToWorld with a capital A...
How do you make an actor jump?
By ILOVELABRADORS, with 10 replies.
Last reply by danpost, over 11 years ago:
Your 'moveAround' method has the wrong type of movement for an actor that is supposed to be able to jump. You should not be using 'turn' and 'move'. The vertical movement is determined by surfaces and jumping; the horizontal movement should be adjustments to the position of the actor along the horizontal (changes in what 'getX()' returns) using the 'setLocation' method with detection of the 'A' and 'D' keys (obstructions should also be detected here). The 'W' key can be used for the trigger for jumping and the '1' and the 'S' key detection blocks can be removed.
Trying to make a Foot pedal on the piano project from the book.
By GhostTheToast, with 6 replies.
Last reply by danpost, over 11 years ago:
@Super_Hippo, sorry if I made it seem your response was incorrect. If I had looked a little closer as to what you were pointing out, I would not have responded at all. In fact, if you notice, I qualified the apparent discounting with exactly what the problem was:
danpost wrote...
provided you are passing the right ones in the right places
Again, I apologize.
Hit Detection in transparent images
By jackyyang09, with 3 replies.
Last reply by danpost, over 11 years ago:
If there are edges of your images that are totally transparent (edging that can be removed without removing any of the actual image, you could load them into my
Image Transparency Adder/Trimmer
scenario and re-save them (all excess transparent edges are removed automatically -- just load and save). You can download the scenario, open in greenfoot and save it as an application for future use.
Parameter pandemic
By BackdoorHermet, with 5 replies.
Last reply by danpost, over 11 years ago:
First, you have a reference to the ninja in this 'levelOne' world. There is no need to have the ninja pass its x and y to the world -- 'ninja.getX()' and 'ninja.getY()' can be used straight away (getting the most current position of the actor). You can eliminate the 'ninjaX' and 'ninjaY' fields from the class as well as the 'updateNinjaPosition' method. You may be able to do similar with the 'ninjaDirection' field (depending on exactly what it refers to). What you could use is a method in the world class to pass the ninja actor itself:
654
655
656
657
658
659
660
X