Repository navigation
Help confirm sound no play help meeeeeeeeeeeeeeeeeeeee #1212
|
So basically I made a custom main menu screen and am having trouble with the confirm sound effect. Some buttons don't lead to anything and when I press those the sound plays, but when I press something that does lead to a new state such as Freeplay, the sound doesn't play. https://youtu.be/GTmOB0VtEDk This is a video showing the problem more in depth. Pls help. Thanks in advance! |
Replies: 1 comment 1 reply
|
Since the sound plays on buttons that stay in the menu, I’d check when the Freeplay button calls |
Since the sound plays on buttons that stay in the menu, I’d check when the Freeplay button calls
FlxG.switchState. In the stock menu,selectItem()playsCoolUtil.playMenuSFX(CONFIRM)first, then opens Freeplay inside the menu animation’s completion callback about a second later. Try the same order in your custom button: play the sound, then switch states when the animation finishes. Stock Freeplay button