Question about sound on/off button

Well this is what I have

Attribute SoundOff interger = 0

My background actor has it when sound off integer is at 0 --> play music
Than I have a sound button when pressed makes attribute Soundoff+1 (Which turns off the music)
- Than spawns a sound off actor
Sound off actor when pressed makes attribute sound off =0 (turns the music back on)

Ok now thats all good, BUT

When I change the scene and I go back with a back button i've made. The button goes back to sound on but the music is off! Is there anyway I can fix this so when the player comes back it shows the sound off button?

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    //
  • XanpakutoXanpakuto Member Posts: 9
    //
    help meee :p
  • SocksSocks London, UK.Member Posts: 12,822
    edited December 2012
    //
    help meee :p
    Sorry ! I was just posting a much more simple way of toggling music on and off (without spawning and all that) - but in hindsight I realised that your question was a little different to that.
  • XanpakutoXanpakuto Member Posts: 9
    //
    help meee :p
    Sorry ! I was juts posting a much more simple way of toggling music on and off (without spawning and all that) - but in hindsight I realised that your question was a little different to that.
    So what do I do so when i go back to my main menu screen the sound button will be shown OFF not ON when the music isn't playing.

    Cheers
  • SocksSocks London, UK.Member Posts: 12,822
    So what do I do so when i go back to my main menu screen the sound button will be shown OFF not ON when the music isn't playing.

    Cheers
    Too many double negatives and vague diction for me I'm afraid (which is where I think I went wrong on my first response), if you can articulate what you want really simply I'm sure someone will supply a quick solution.
  • XanpakutoXanpakuto Member Posts: 9
    So what do I do so when i go back to my main menu screen the sound button will be shown OFF not ON when the music isn't playing.

    Cheers
    Too many double negatives and vague diction for me I'm afraid (which is where I think I went wrong on my first response), if you can articulate what you want really simply I'm sure someone will supply a quick solution.
    Ok sorry here. So I have set attributes which allowed me to turn off/on my music with a simple press of a button "Music". When the music is turned off, the icon is shown to be red instead of it's earlier color blue. Now when i change a scene and return, the music button is shown to be (on) even though the music is not playing. I hope someone can answer my question now.
  • SocksSocks London, UK.Member Posts: 12,822
    I have set attributes which allowed me to turn off/on my music with a simple press of a button "Music".

    Ok.

    When the music is turned off, the icon is shown to be red instead of it's earlier color blue.

    Ok.

    Now when i change a scene and return, the music button is shown to be (on) even though the music is not playing.

    What would you like to happen when you return to the scene ? Would you like the music to be playing or not playing (the relationship with the button is obvious enough) ?
  • XanpakutoXanpakuto Member Posts: 9
    I have set attributes which allowed me to turn off/on my music with a simple press of a button "Music".

    Ok.

    When the music is turned off, the icon is shown to be red instead of it's earlier color blue.

    Ok.

    Now when i change a scene and return, the music button is shown to be (on) even though the music is not playing.

    What would you like to happen when you return to the scene ? Would you like the music to be playing or not playing (the relationship with the button is obvious enough) ?
    If the player has turned off the music before changing scenes (The button will be red). Now let's say he went to a level scene and when he's done, then the player goes back to the main menu (remember he's been playing the game with the music off currently). I want the button to be red (the way he left it). Not the blue (Music on) button to appear when he comes back.
Sign In or Register to comment.