When a bird touches the bottom of the world I make it stop moving and want to add one new bird. With my code it adds a bunch of birds when I just want one.
if (getY()>=getWorld().getHeight() -1)
{
xSpeed=0;
ySpeed=0;
world.addObject(new Bird(5,0), Greenfoot.getRandomNumber(800), Greenfoot.getRandomNumber(600));
}
