Detect if Music / Sound is playing

trptrp Member Posts: 16
edited November -1 in Working with GS (Mac)
Hello,

i need help. I am new to GS and working on a project where different Sounds / Music is played randomly. I want to detect if a Sound is still playing before i generate a new random number and let it play. Something like a random playlist..

Any idea?

Regards from Germany!

Comments

  • trptrp Member Posts: 16
    So i have to add a game value with the sound length for each sound?
  • QbAnYtOQbAnYtO Member Posts: 523
    why not just game.music=1

    and then do something like

    "if game.musictime = 1,
    do (whatever u want to do here)
  • trptrp Member Posts: 16
    I made it like tshirtbooth said and it works, need only sone fine adjustment now.

    Next question, is it possible to load something like a data file with the soundfile lengths and add them to the game attributes? Something like a primitive database..
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi trp, no way to do that, i.e no database type elements at all in GS. So it's putting your music lengths into the attribute values one by one, sorry.

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

Sign In or Register to comment.