how to make space for automatic shooting
if (Greenfoot.isKeyDown("space"))
{
Bullet b = new Bullet(); //create a new bullet
getWorld().addObject(b, getX(), getY()); //add the bullet at the position of the shooting object
b.setRotation(getRotation()); //set the bullet's rotation the the shooter's rotation
b.move(5); //move it a little bit so the bullet does not start in the middle of the shooter
}private int shootDelay=20, shootTimer=0;
//...
if (--shootTimer<1 && Greenfoot.isKeyDown("space"))
{
shootTimer = shootDelay;
//rest of code above
}