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
"Gamepads with Greenfoot" is outdated!
By K_wow, with 4 replies.
Last reply by K_wow, about 11 years ago:
davmac wrote...
I'm not sure it needs updating. The window you posted shows that it doesn't specifically recognize Windows 7, but that it uses the "default windows plug-in" which I think should be ok. The real error is after that: "Failed to acquire device". To be honest I'm not sure what that means precisely; perhaps some other program that is running has already claimed the gamepad?
Thanks for the reply davmac :) As for other programs claiming the gamepad, I'm not sure about that, I'm not playing any other games with the gamepad plugged in at the time... There may be some hidden prog
Greenfoot won't compile
By jahusa02, with 7 replies.
Last reply by jahusa02, about 11 years ago:
I tried with new scenario and scenarios from the Website Always the Same problem
Newtons-Lab-3: problem adding planets with mouseclick
By PoDh34d, with 9 replies.
Last reply by Nuraini0795, about 11 years ago:
where is scenario ?
Moving up!
By hipsterpants, with 4 replies.
Last reply by hipsterpants, about 11 years ago:
Thanks JetLennit and danpost! You guys helped a lot!
Saving an integer
By Ben&Sam, with 1 reply.
Replied to by danpost, about 11 years ago:
It would help if you show what you have tried (use the 'code' link below the reply box for posting code). The code for the pieces might be important; how many pieces created (or moving) might help; any extra information regarding what you are trying to accomplish (in general) might also help.
Movement like doorkickers
By JasonIsMobile, with 2 replies.
Last reply by danpost, about 11 years ago:
I need help making a scoreboard.
By zekromslayer, with 5 replies.
Last reply by jimboweb, about 11 years ago:
If you want to keep score during the game, I have made a downloadable ScoreBoard class that you might find useful. You can find the class here:
http://mrstewartslessons.com/useful_class_scoreboard.html
Simply download the class into your Greenfoot project folder. Close Greenfoot and open it again and you'll see the ScoreBoard class among your actors. Open its code window and change 'Source Code' to 'Documentation' and you'll see directions as to how to use it in your actor's code. It has various constructors that allow
Ship game help
By Fuzzion, with 1 reply.
Replied to by jimboweb, about 11 years ago:
I have made a MoveRandomly class that you can include in your Greenfoot project that will cause another actor to move randomly. The code can be found here:
http://mrstewartslessons.com/useful_class_moverandomly.html
Simply download the java file into your greenfoot project. Close greenfoot and reopen the project, and you'll see the MoveRandomly class among your actors. Open the code window and change 'Source Code' to 'Documentation' and you'll see directions for including the object and its methods in your actor's co
How do i make a random moving target and shoot rockets from another actor?
By Fuzzion, with 2 replies.
Last reply by jimboweb, about 11 years ago:
I've created some useful classes that will do some of what you're looking for. Two of them in particular. The MoveRandomly class can be found here:
http://mrstewartslessons.com/useful_class_moverandomly.html
and the Projectile class can be found here:
http://mrstewartslessons.com/useful_class_projectile.html
To use them, download the files into your Greenfoot project's folder. Close the project and open it again and you'll see the classes list
How can I call a variable int from an othe class?
By largowinch123, with 12 replies.
Last reply by danpost, about 11 years ago:
<Code Omitted>The above line can be used in your Crab class to obtain a reference to the counter. After that line you can call any public method on 'counter' ( counter.methodName(parameters); ).
Bouncing off of walls?
By JDSmooth, with 9 replies.
Last reply by jimboweb, about 11 years ago:
You might want to use the DriftMove class which I have created. It allows you to make an object drift on the screen and features a BounceAtEdge method that reflects at the angle that it hits the edge, just like a regular ball. It also allows you to set a random speed on spawning, and a number of other methods that might help. You can find it here:
http://mrstewartslessons.com/useful_class_driftmove.html
Select-click on the 'Download Class' and save it in your project folder. Close your project and open it again, and th
Changing color of my ball
By NIcolasGomez, with 9 replies.
Last reply by danpost, about 11 years ago:
You do not need a separate class for each color of the ball. Just change the image of the one Ball actor to change its color. Use the 'setImage' method supplying the String name of the file to change the image to. If you want the ball to alternate between the two colors as it hits the paddle, then hold both images in instance fields and set the image of the ball to one of them in the Ball class constructor. Then, when the ball hits the paddle, use the 'if' condition 'getImage() == image1' to determine which image to set (on 'true' result, set image to 'image2' else set image to 'image1')
Help Shooting Please!
By JamesHughes, with 2 replies.
Last reply by danpost, about 11 years ago:
The only thing you have to distinguish between a right or left facing tank is the image; so that will be the condition to use to determine the direction of the bullet: <Code Omitted>Now, this code needs to be within an 'if' block whose condition determines that tank is firing: <Code Omitted>where you write a method to return a boolean value (true or false):
Move error occurs when the bullet object is removed,this class extends the Mover class!! HELP PLEASE!!
By crinno, with 1 reply.
Replied to by Super_Hippo, about 11 years ago:
You can't call 'getWorld()' after you removed the object. You could add a line like 'if (getWorld != null)' in line 29 and 40.
I cannot understand paint method in greep scenario
By songgh1999, with 3 replies.
Last reply by danpost, about 11 years ago:
All you need do is put something like the following in the act method of the Greep class for a greep to spit: <Code Omitted>You will probably want to put a condition on calling it, however, using an 'if' clause to regulate it.
635
636
637
638
639
640
641
X