Help...anyone can explain this problem to me ? why nothing happen ?

Best Answers

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    I went ahead and looked at the file and I can tell you the problem. You imported the sound file as a "Sound" in GameSalad but then tried to play it using a Play Music behavior. If you intend to use Play Music, then you have to choose "Music" as the type when you import it. Otherwise, you have to use the Play Sound behavior.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Posts: 11,949
    Accepted Answer

    Your expression is (game.sound +1)/2, when what you want is (game.sound+1)%2. The '%' function (aka modulo) returns the remainder of a division problem. The preferable way to write this in GameSalad is mod(game.sound+1,2) as the '%' symbol won't be supported much longer.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Answers

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    It's really asking a lot for someone to download your project file, preview it, and then try to guess what is or is not working.

    Why not give us some idea of what the problem is?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2014

    @tatiang said:
    It's really asking a lot for someone to download your project file, preview it, and then try to guess what is or is not working.

    Why not give us some idea of what the problem is?

    @tatiang

    Could you also tell me what is wrong with my project (not sure where my project is, maybe mediafire or wetransfer, just search around I'm sure you'll find it) the problem is that the game is not working, please Skype me with a solution, or if you can't guess my Skype address just send me a fix via gmail (or Hotmail or whatever).

    :)

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Socks I was able to deduce that your Google Doc was missing a header and I've fixed it for you.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17

    @tatiang‌ .. so what should i do...??

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2014

    @musafirhina69@yahoo.com said:
    tatiang‌ .. so what should i do...??

    >

    @tatiang said: "If you intend to use Play Music, then you have to choose "Music" as the type when you import it. Otherwise, you have to use the Play Sound behavior."

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2014

    @tatiang said:
    Socks I was able to deduce that your Google Doc was missing a header and I've fixed it for you.

    It's ok, I've solved it (moments after reading your post), but I also have an entirely unrelated question about platforms moving when the robot jumps on them, send solutions to my Facebook account.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2014

    @musafirhina69@yahoo.com said:
    tatiang‌ .. so what should i do...??

    Delete the sound file from the Library in Creator. Then import it back in and when given a choice to import it as a "sound" or "music" file, choose "music." Then use a Play Music behavior to play the sound (select the name of the sound file you imported in the drop-down menu within the behavior).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17

    tq very much @tatiang @Socks...i already change like u say and its working and i can push the pause button to stop the sound but..when i push the pause button again to hear the sound back..its not working..what is problem ?

  • SocksSocks London, UK.Member Posts: 12,822

    @musafirhina69@yahoo.com said:
    tq very much tatiang Socks...i already change like u say and its working and i can push the pause button to stop the sound but..when i push the pause button again to hear the sound back..its not working..what is problem ?

    The problem is most probably being caused by the way you have your behaviours / rules (etc) set up.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Without seeing your rules, we can't know how you have it set up. Post a screenshot or your updated project file and we'll tell you why it's not working.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17

    sure...this my updated project...https://dropbox.com/s/zgw0moqg6y6auvl/playsound.rar

  • SocksSocks London, UK.Member Posts: 12,822

    @tatiang said:
    Your expression is (game.sound +1)/2, when what you want is (game.sound+1)%2. The '%' function (aka modulo) returns the remainder of a division problem. The preferable way to write this in GameSalad is mod(game.sound+1,2) as the '%' symbol won't be supported much longer.

    . . . . or even more compatible:

    1-game.sound

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Socks said:
    1-game.sound

    I always forget that... thanks, @Socks!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17

    tq @tatiang‌...now i know...modules is my problem...huuu..tq so much

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    yw!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • musafirhina69musafirhina69 MalaysiaMember Posts: 17

    when i have another problem...can i ask over here ?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Yes, it's fine to continue a thread with another question you're working on.

    But please keep in mind that you've given us very little information so far and it's difficult to help you without having the details about what you're trying to do.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.