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
How To Get Object To Only Detect Intersecting Object Once
By JackStieben, with 3 replies.
Last reply by danpost, over 13 years ago:
You do not want to execute the last three 'if' statements every act; only when the score increases. So move those 'if' statements up inside the previous one right after increasing the score value.
Loop Statement Help
By Robert2.0, with 5 replies.
Last reply by danpost, over 13 years ago:
A good source of information pertaining to programming in java can be found in the
Java tutorials
. The second section on the left titled in red (Trails Covering the Basics) is the place to start (especially the sub-section called 'Learning the Java Language'.
How do you make a sequence of objects appear?
By johnguackmbl, with 7 replies.
Last reply by danpost, over 13 years ago:
It varies; but a general rule for a scenario running at standard speed (speed slider in the middle) is somewhere around 55 to 60 cycles per second.
Movement Help
By Robert2.0, with 5 replies.
Last reply by danpost, over 13 years ago:
Ok, first you need an instance int field to hold the changing limits. Then, you only need to check for that limit and when there, reverse the direction (which should also be held in an instance int field, storing one or negative one (so all you have to do is add that amount to the current y value) and get a new limit.
Find out if one Actor no longer exists in the world
By carhad, with 8 replies.
Last reply by carhad, over 13 years ago:
So I did that and It showed level2 at the start. Oh in the scenario there are more then one of the same actor in the world. And I also have to go now so.........Bye! For now.
Help with setting up a main menu
By Christineekhoury, with no replies.
My game is pretty much completed I just wanted to know how to add on a main menu....I current have just one world class called myWorld and all my actors are as follows Actor door object elevator platform stopper dropper box lever music control enemy turret tank projectile robo glob fall bat portal char (character) upgrade FPS overlay bullet sword
Help with collisions
By FlyingRabidUnicornPig, with no replies.
I have found the solution to my problem. Please do not reply to this topic.
Health for enemies
By henrYoda, with 26 replies.
Last reply by danpost, over 13 years ago:
You need to show more of the code surrounding this method. It could be something like improper bracketing.
method wait() in greenfoot
By kill, with 3 replies.
Last reply by danpost, over 13 years ago:
Compare the following code to my last post. It was pretty much word for word. <Code Omitted>
Game error
By geekykid2013, with 65 replies.
Last reply by danpost, over 13 years ago:
Again, you need to change the conditions in your 'checkNextLevel' method to properly qualify when to change worlds, and which world to change to.
Counter class
By DoctorProfessorYoshi, with 1 reply.
Replied to by davmac, over 13 years ago:
"the one on the website" - I'm not sure what you mean by that; just import the one that's included with Greenfoot ("Edit" menu, "Import class").
method wait() in greenfoot
By kill, with 1 reply.
Replied to by danpost, over 13 years ago:
Answered on another discussion.
Graphics/design
By MaxAlbert, with 2 replies.
Last reply by MaxAlbert, over 13 years ago:
It does, thank you!
Menu with a button
By JesusJesus, with 4 replies.
Last reply by JesusJesus, over 13 years ago:
Ach jetzt sehe ich erst durch deinen namen dass du deutsch bist^^ das hätte es für mich leichter gemacht naja egal ;)
Health bar
By manish1, with no replies.
Hello, i am currently working on a on a tank game, and need help with the health bar, i already have the getHit() method for the wall but i need to make a health bar, this is what i have: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class wall here. * * @author (your name) * @version (a version number or a date) */ public class SeigeTower extends Actor { private int TowerHealth_; /** * Act - do whatever the wall wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public SeigeTower() { TowerHealth_ = 5; } public void act() { checkHealth(); checkDestroy(); } public boolean collides() { Actor a = getOneIntersectingObject(BouncingBullet.class); if(a == null) return false; getWorld().removeObject(a); return true; } public void checkHealth() { if(collides()) { TowerHealth_--; } } public void checkDestroy() { if (TowerHealth_ == 0) { World world; world = getWorld(); world.removeObject(this); } } }
835
836
837
838
839
840
841
X