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
Having a Turret Follow A Tank
By askgriff, with 17 replies.
Last reply by Zamoht, almost 13 years ago:
Make a new variable for your turret classes. private int cooldown or something. Then add one to it every act and put an if-statement thats makes sure you can only fire a bullet when "cooldown" is above x. Then when you shoot a bullet make sure to set "cooldown" to 0. EDIT: The same idea as danpost's.
Check any Object is in a Pixel
By Morinator, with 3 replies.
Last reply by Morinator, almost 13 years ago:
ty
mouseClicked() to new world
By dc2-typer, with 9 replies.
Last reply by dc2-typer, almost 13 years ago:
@danpost You are right, I had another actor stopping it from working for some reason. Thank you danpost and JetLennit for the help I really appreciate it. :)
Scrolling World Problem
By RedCreeper, with 13 replies.
Last reply by danpost, almost 13 years ago:
Once the main actor is in the top-left corner of the scrolling world, everything right and below it would be positive. So, yes; otherwise you will be placing the objects outside the possible scroll areas.
Breakout Change Brick Color Help
By LugNut29, with 5 replies.
Last reply by LugNut29, almost 13 years ago:
Ahhh! That worked! Thank you kindly FlyingRabid!
getWorld().removeObject(object);
By sihaco, with 6 replies.
Last reply by danpost, almost 13 years ago:
Try it after removing the 'isHit' part and see if it works, then. If not, then it has something to do with the value of 'isHit' (maybe its value is changed before a car is touched). The code to try is this: <Code Omitted>
While loop problem
By sihaco, with 4 replies.
Last reply by sihaco, almost 13 years ago:
Okay thanks guys, it works!
I need help with java Graphics
By Kartoffelbrot, with 3 replies.
Last reply by SPower, almost 13 years ago:
Again, your approach is just wrong. It's not that you're using one class wrong here, but in my opinion it should just be rewritten here. I'll give you an example:
Is there a method to check if my object can move?
By gamer9999, with 2 replies.
Last reply by danpost, almost 13 years ago:
The method Gevater_Tod4711 was referring to is 'getOneObjectAtOffset(int, int, Class)' with the offsets before the class. However, that just checks for a mushroom to one side or another. If the mushroom cannot be pushed, then there is an object (whether another mushroom or a tree or wall) that is preventing the mushroom from moving. This information (whether there is an object preventing the mushroom from moving or not) needs to be passed back to Kara so she knows whether she can push it or not. I did a duplication of a Kara program that was here on the site (I did not use or even view a
How can i push a mushroom from a corner
By gamer9999, with 1 reply.
Replied to by danpost, almost 13 years ago:
If this is a programming question, then yes. You should be able to program a way to 'push' a mushroom from a corner. Check for the specific conditions and whatever trigger you wish to use to push a mushroom away from a corner and have it move to what I would believe to be the only possible location away from the corner.
How do i draw a line
By fluttershy, with 7 replies.
Last reply by Kartoffelbrot, almost 13 years ago:
I know. I wasn't referring to your comment. I only wanted to help and maybe that was a problem, too.
Doesn't see a left wall....
By ddvink, with 2 replies.
Last reply by ddvink, almost 13 years ago:
You're awake!!!! Thanks a lot!
Need help getting things to show up on the score board.
By wiserviser, with 6 replies.
Last reply by GreenHouse, almost 13 years ago:
wiserivcer; you have multiple int misses: Once in Fodderworld.class (this is the int misses, that is increased in the method gainMiss() ) and once in Turret.class (this is the int misses, that is used for updating your scoreboard by statusBoard.setValues() ) Because the second one is never increased, the score doesn't change...
How do i make a counter?
By Aermus, with no replies.
I have have two counters. One when the police caputers a thief and one when a thief brings a car into a garage. It is similair to the GTA game. How ever i made a score like de wombat has eaten a leave. I can see in the inspect how many thiefs a police has caputerd. How ever i want this score into my counter.. How do i do this?? <Code Omitted> and this is the code for the counter, similiair to de crab game <Code Omitted>
odd or even number
By RedCreeper, with 10 replies.
Last reply by RedCreeper, almost 13 years ago:
thank you
782
783
784
785
786
787
788
X