No Sound on Device?

BoyGeniusStudiosBoyGeniusStudios Member Posts: 92
edited September 2012 in Working with GS (Mac)
So I have a button that toggles music in my game and it works fine on my MBP, and I also have a change attribute game.music to 1. All the sounds and music and fine on my MBP, but on my iPhone they are nonexistent, does anyone know the fix?

Comments

  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92
    Here is the rule, the first part says: If touched...
    http://i.imgur.com/jvcXI.png
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited September 2012

    @boygeniusstudios

    Hi, as GSC can only play one Music file at a time, you don't need to change the volume of the Music. Not sure if that in itself will solve your prob, but should do....

    Also, you'll need a "one-off" boolean to find out if the music file has started, to be able to use Resume Current Music.

    When game.G_music is 0
    Change attribute game.G_music to 1
    ---this next rule nested in above
    When MusPlay is false
    Change attribute MusPlay to true
    Play Music sound: ---your music track
    Otherwise
    Play Music sound: Resume Current Music
    Otherwise --- main one
    Pause Music
    Change attribute game.G_music to 0

    Hope that sorts it for you.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92
    I am sorry, but that confuses me. If it wouldn't be too much of a bother, could you upload a picture of that rule please?
  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92
    Nevermind I understand now, let me see if that works...
  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92

    @boygeniusstudios

    Hi, as GSC can only play one Music file at a time, you don't need to change the volume of the Music. Not sure if that in itself will solve your prob, but should do....

    Also, you'll need a "one-off" boolean to find out if the music file has started, to be able to use Resume Current Music.

    When game.G_music is 0
    Change attribute game.G_music to 1
    ---this next rule nested in above
    When MusPlay is false
    Change attribute MusPlay to true
    Play Music sound: ---your music track
    Otherwise
    Play Music sound: Resume Current Music
    Otherwise --- main one
    Pause Music
    Change attribute game.G_music to 0

    Hope that sorts it for you.

    One more thing, so at my main menu I have the option to go to the options menu. Right now if I start the game, it will be silent until I go to the options menu and hit the toggle. How would I go about making the music start playing on the menu, and if I wanted to stop I could go to the options menu and press the button?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    I see, so the music starts playing the moment you go to the main menu... got it!

    Put a blank actor at the side of the menu screen - outside of the viewable area, and put in it:

    Play Music --- your track
    Change Attribute game.G_music to 1

    So now when you go to your Options, in the button to turn music on and off, you don't need MusPlay, so what you originally had was fine (except not needing change of volume).

    So in your option button for toggling the music on/pause, revised as:


    When game.G_music is 1
    Change attribute game.G_music to 0
    Pause Music
    Otherwise
    Change attribute game.G_music to 1
    Resume Current Music

    That's a bit more straightforward now.... :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92

    I see, so the music starts playing the moment you go to the main menu... got it!

    Put a blank actor at the side of the menu screen - outside of the viewable area, and put in it:

    Play Music --- your track
    Change Attribute game.G_music to 1

    So now when you go to your Options, in the button to turn music on and off, you don't need MusPlay, so what you originally had was fine (except not needing change of volume).

    So in your option button for toggling the music on/pause, revised as:


    When game.G_music is 1
    Change attribute game.G_music to 0
    Pause Music
    Otherwise
    Change attribute game.G_music to 1
    Resume Current Music

    That's a bit more straightforward now.... :-)
    For some reason, that does not work. If I preview and start the game and it goes to the menu, and if I go to the options and turn music off it will just start playing again when I go back to the menu.
Sign In or Register to comment.