^^^ I tried that it didn't work


1 2 3 4 5 6 7 8 9 | // add instance field private boolean soundPlayed; // the 'if' block if (getX() == 1185 && !soundPlayed) { getWorld().addObject( new Label(), 400 , 249 ); soundSound.play(); soundPlayed = true ; } |