Continuing Sound After Pausing Game

Hi everyone,

When I pause the game and then click to continue to return back to the game, the sound from the game stops.

any ideas on how to fix this?

Lee

Comments

  • jigglybeanjigglybean Member Posts: 1,584

    there should be a behaviour to pause the music. But if its a sound, then you will need to set up some rules. Music and sounds are treated differently.

    Like Balls? Then click here! We've 100 coming soon

  • ManxMannManxMann Member Posts: 28

    Yeah it is a sound, any idea what rules I need to set up?

    Thanks.

  • jigglybeanjigglybean Member Posts: 1,584

    If you want to stop a sound from playing have it in a rule that when true it runs the Play Sound behavior (w/o the Run To Completion selected.) Making that false will stop the Play Sound behavior if it was playing.

    Like Balls? Then click here! We've 100 coming soon

  • ManxMannManxMann Member Posts: 28

    Thank you again for the suggestion,

    I have tried this by setting up a rule as follows;

    if game.playsound = true do playsound

    When you click pause;

    change attribute game.playsound to false

    Pause Game show scene Pause Menu

    When you click continue;

    change attribute game.playsound to true

    Unpause Game

    Yet the sound will not start to play again.

  • jigglybeanjigglybean Member Posts: 1,584
    edited August 2014

    use Booleans for true/false attributes? Attach the sound to an image either outside the game area or inside, it will give you more control. Can you take a screenshot and post it

    Like Balls? Then click here! We've 100 coming soon

  • ManxMannManxMann Member Posts: 28

    I've managed to get it to work,

    I had to add a timer into the pause rule

    when you click pause;

    change attribute game.playsound to false

    timer after 0 seconds

    Pause Game show scene Pause Menu

    for some reason it wont work without the timer.

    I am using booleans and the sound rules are located in the Hud actor.

Sign In or Register to comment.