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
Rolling pool balls
By BrownBoii333, with 1 reply.
Replied to by JetLennit, almost 11 years ago:
Check out
this
series
Unable to pass the value of a collectable
By connorxclose, with 5 replies.
Last reply by danpost, almost 11 years ago:
That means that you have not set a Counter object to the 'scoreCounter' class field.
Does any one know how this works?
By chamuzi3, with 1 reply.
Replied to by danpost, almost 11 years ago:
Here is what I see: we have an Actor class that creates Rat objects (line 9) that initially moves 1 pixel per act (line 11). The fact that the 'speed' field has 'private' access and that the value of the field is never changed indicates that this initial speed is also its permanent speed when moving. This makes the 'for' loop in the 'act' method (line 18) unnecessary. The following should be sufficient: <Code Omitted>Now, for the 'move' method: lines 22 through 26 gets user keyboard input for movement of the actor by way of the arrow keys -- no problem
help
By alikhan, with no replies.
anyone knows how to add enemies. I have made a tank game I am able to control it, the tank is also able to shoot, now I need help with adding enemies. I want to add other tanks that are able to shoot back at me. some help would be really good as I am doing this for a school project. thank youuuuuuu
"Gamepads with Greenfoot" is outdated!
By K_wow, with 4 replies.
Last reply by K_wow, almost 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, almost 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, almost 11 years ago:
where is scenario ?
Moving up!
By hipsterpants, with 4 replies.
Last reply by hipsterpants, almost 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, almost 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, almost 11 years ago:
I need help making a scoreboard.
By zekromslayer, with 5 replies.
Last reply by jimboweb, almost 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, almost 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, almost 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, almost 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, almost 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
634
635
636
637
638
639
640
X