License from €75 Log in
DE EN FR ES IT CZ

Background music

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  1. · 12 years ago
    Hehe,

    anyway it's strange, i tried different file and path too and still the same, i'll leave it for now and get back to it later..
    Thanks
  2. · 12 years ago
    “
    btw what the flags=1 means?
    „


    this marks an argument as a flag argument and is needed for the argument parser of our commands. Since a table can be used for almost anything in Lua we use the 'flags' key to mark a table for optional command flags.
  3. · 12 years ago
    Thanks for clarifying exactly what it is used for Alex. wink
  4. · 12 years ago
    I have the same problem, the startSound() script loads the audio file and plays it just for a millisecond or so.
    Was anyone able to find a solution? smile
  5. · 12 years ago
    “
    I have the same problem, the startSound() script loads the audio file and plays it just for a millisecond or so.
    Was anyone able to find a solution? smile
    „


    I've found a workaround.
    It might now be viable for all situations though.
    Start the sound with the Action right before running the script instead of in the script itself. Then reference it in the script with the getSoundId() function and then you will be able to manipulate it in the script with the setSoundProperties() and so on.
  6. · 12 years ago
    Nice one.

    It still doesn't work for me..
    The code:
    local SoundID = getSoundId("vispath:podklady/Hudba/hotel/party.ogg")
    
    setSoundProperty(SoundID, {flags=1,  volume = 40,   loop = true,  offset = math.random(76000) })
    

    The song starts playing always from the beggining.

This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.

New thread

Really delete this post?