//My wall actors are named as Wall with a capital W.
public class Fbot extends Animal
{
public void act()
{
{
if(Greenfoot.isKeyDown("d")) setLocation(getX()+3, getY());
if(Greenfoot.isKeyDown("a")) setLocation(getX()-3, getY());
if(Greenfoot.isKeyDown("s")) setLocation(getX(), getY()+3);
if(Greenfoot.isKeyDown("w")) setLocation(getX(), getY()-3);
}
if(canSee(Bat.class))
{
Greenfoot.playSound("air.wav");
Greenfoot.stop();
}
}
}