bug with gamesalad and iOS4

galbangalban Member Posts: 62
edited November -1 in Working with GS (Mac)
hello

I have a button : Sound ON/OFF in my game

i use this rule

Actor (button pause) receives event -> Touch -> pressed
if game.soundOFF is true then
change attribute Game.SoundOFF to false
Play Music My Music (loop)
else
Pause music
Change attribute game.soundOFF to true
end

on my iPhone (3gs iOS 4)

1/ I test my game : i stop the music (i press the sound Off button in my game)
2/ i pause my game (with the only button on the iPhone, so my game is in the mutitasks desktop) and i relaunch it, my game restart at the same location, but it's impossible to reactive the music even if i press the sound off/on button of my game without any reason (only the sounds are playing).

Another bug : The "touch pressed" event works bad after using the multitask of the iphone (only with gamesalad project)

Sorry for my english, i'm french

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    did you try with Stop Music instead of Pause Music?
    I think the bug might be with the Otherwise behavior in your Rule.
    I would have those things in a Rule.

    [Rule] when touch is pressed
    --[Rule] when game.SoundOFF = true
    ----do this
    --[Rule] when game.SoundOFF = false
    ----do that

    are you doing your multitask test in the GS Viewer or in a build?

    your English is good... and, I prefer to kiss in your native tongue!

    MH
  • galbangalban Member Posts: 62
    >>did you try with Stop Music instead of Pause Music?
    I use "pause music"

    >>are you doing your multitask test in the GS Viewer or in a build
    i test directly on my iphone

    My rules seems correct because all the sounds are correctly played, only the behaviour "play music" doesn't works

    Sincerely

    GA
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi galban, once you've paused your music, for it to continue from where it left off, you need the Resume Current Music in the Play Music Behaviour. And GS rules need to know when the music has just started, or if it's continuing.

    So you need another boolean, let's call it game.Playing. Here are the amended Rules for your button:

    http://i257.photobucket.com/albums/hh228/gyroscope_photos/grab01.jpg

    Hope it helps you. :-)

    Whoops: in the first Otherwise section, you can delete "Change Attribute game.Playing to true".

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

Sign In or Register to comment.