Im making a game where I would like a certain sound to run every 3 seconds. This is the code I would like to run every three seconds. Is there something I could stick in the public void act() to make this work?
if(distance <= 200)
{
Ping.setVolume(100-(Math.round(distance/2)));
Greenfoot.playSound("Ping.wav");
}
