pause game and sound loops

app-etiteapp-etite Member Posts: 139
edited November -1 in Working with GS (Mac)
Hi Guys,

Ive created a pause button which almost works, it pauses the game and the background music but I also have a sound loop for the characters footsteps, when I press pause the footsteps sound continues to loop.. anyway around this?

Thanks

Comments

  • app-etiteapp-etite Member Posts: 139
    thanks for your reply GsLover

    im sure i followed your instructions right but its not working.

    I have this in the pause button actor.
    --------------------------------------------
    When actor receives- touch - pressed.. then pause game.
    --------------------------------------------

    and
    -----------------------------
    when actor receives touch- pressed

    change attribute... game.pausegame to 1
    ---------------------------------

    now on the pause screen itself i have the same pause actor but with different code inside which says...

    -----------------------------
    when actor receives- touch is pressed

    change attribute game.gamepause to 0

    and unpause game.
    ------------------------------
    is that right?

    thanks
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    the first rule just needs to be when touch is pressed:
    -pause game
    -change attribute pause to 1

    the unpause is screen is right, then in whatever actor that loops the sound that u want to pause, put the play sound behavior in a rule that states when attriube pause=0
  • app-etiteapp-etite Member Posts: 139
    thanks john but still no luck.. i think there may be confusion with it because My character runs and jumps so I have a rule in the character actor......

    ...when actor overlaps the ground then play the footsteps sound, so the footsteps dont play while jumping. at that sound is on loop so it carries on when i press pause. that a problem you think? Thanks
Sign In or Register to comment.