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
doing things without act method
By HalbFettKäse, with 1 reply.
Replied to by danpost, over 8 years ago:
What actions would you like the user to perform before the simulation starts? (be specific and complete)
Opening/associating custom filetype with wrapped Greenfoot project
By Comwp, with no replies.
Hi, I use Launch4j in association with my greenfoot projects to make my video games usable by all. I've recently discovered the glory of fileio, and it's associated responsibilities. my current project uses a custom filetype '.SOLSTICE' (which is essentially a '.txt' format with a different extension). I was able to successfully get my 'test.SOLSTICE' file to associate with and open my wrapped project. What i'm asking, though, is, is there a way to programatically initialize the world with a string (or something) parameter, that is just essentially the contents of that text file? is there another way to get the data of the file i'm double clicking to open my project in the same way, per say, a .pptx would open PowerPoint, and then open itself inside of it?
make smaller/better hitboxes
By Recorsi, with 5 replies.
Last reply by danpost, over 8 years ago:
The code you gave tries to get two-thirds the width, which I would do by way of a fraction (always multiplying first): <Code Omitted>For half width, just divide by two (which is what I used in both code sets above).
How to make an actor appear when something runs out
By SparklinPink, with 2 replies.
Last reply by danpost, over 8 years ago:
A class is an object of type Class. Class objects are not Actor type objects and cannot be placed into a world. Your FinalScreen class describes an object of type FinalScreen, but is not in itself a FinalScreen type object. You can create one or more objects of type FinalScreen) by calling upon a constructor of the class once for each object of that type. Coding 'new FinalScreen()' will create an object of type FinalScreen.
Making the game stop after a specifc amount of seconds
By Michelium, with 2 replies.
Last reply by Michelium, over 8 years ago:
danpost wrote...
Look at line 10 !!! (closely -- try to understand what exactly you have that line doing)
OMG! Thanks! I just did <Code Omitted> and now it works perfectly!
Making an actor move and repeat itself
By R0mane, with 1 reply.
Replied to by danpost, over 8 years ago:
Create two or more ground actors and place them side-by-side -- then have them leap-frog over each other when they are not visible (when outside the viewing area. BTW, you will need to unbound the world (see documentation on World class constructors).
For each loop
By bishal52, with 2 replies.
Last reply by davmac, over 8 years ago:
Note that with the current version of Greenfoot, the first version can be written without a cast: <Code Omitted>
How to make two different actors react to pressing one single key?
By AndreiTir, with 1 reply.
Replied to by Super_Hippo, over 8 years ago:
Try to use the 'isKeyDown' method.
duplicate class
By divinity, with 8 replies.
Last reply by danpost, over 8 years ago:
It means that your 'main' method is embedded inside a class within a class. It needs to be in the root of the class: <Code Omitted>
I'm new to Java and Greenfoot. Bugs in code. Please help!
By iCookieMad, with 2 replies.
Last reply by Super_Hippo, over 8 years ago:
1. To post an image, you have to upload it and then use the link directly to this image and put it into the img-tag. 2. When posting code, no image is necessary, just use the code-tag. 3. Errors in your code: - You check if x or y is less than OR greater than something. The OR (||) is missing in both. - There is an additional w in the last 'getWorld'.
Scenario 6, 6.34
By JDW1998, with 1 reply.
Replied to by danpost, over 8 years ago:
The main class we need to see is the subclass of World you are using.
Reset button in web site does not work
By JohnGomes, with no replies.
The reset button does not work in website. This happens to someone here?
read and write to a java file gives runtime error
By divinity, with 4 replies.
Last reply by divinity, over 8 years ago:
I got it. apparently the file wasnt there. thanks danpost
quadratic gui calculator that wont pop up
By divinity, with 7 replies.
Last reply by danpost, over 8 years ago:
No problems there !! It is not at all obvious to me why you would not have a visible Tester object provided that the 'main' method is the Driver class executes.
Issues with the increment operator
By Beamo, with 5 replies.
Last reply by Beamo, over 8 years ago:
ACTUALLY NEVERMIND! I played around with it a bit and found that what you suggested was the best way to do it, I just had to replace "dot" with "bullet". Thank you! Thanks to everyone who helped me figure this out, it was greatly appreciated.
323
324
325
326
327
328
329
X