I've been trying to figure out what exactly is the problem here
class Player1 is supposed to play the wilhelm scream sound effect when hit by Player2Bullet.
the programs returns an error popup when Player2Bullet hits Player1, saying that the sound file cannot be found. I checked, and wilhelm.wav is in the appropriate sounds folder.
1 2 3 4 5 6 7 8 | public void die() { if (canSee (Player2Bullet. class )) { eat (Player2Bullet. class ); getWorld().removeObject( this ); Greenfoot.playSound ( "wilhelm.wav" ); } |