License from €75
DE EN FR ES IT CZ

Sound Bug Using "Set Fade Effect To New Scene"

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

  1. · 13 years ago
    Thank you so much... you are always a great help!!!

    I will see what I can do. Will report back to you later!!! wink
  2. · 13 years ago
    Short question: Does this all has to be done by one script or do I need more than one script to do it?
  3. · 13 years ago
    what do you mean?

    You could create functions to handle it or you can create execution scripts.
  4. · 13 years ago
    Not sure if I am thinking right but lets see. At the beginning of the first scene I call an execution script that starts to play the sound. At the end of the scene I have to call another script that gets the offset of the sound. Than the scene changes and it calls a third script that start the sound with the offset from the scene before. Is that about right or I am completely off?
  5. · 13 years ago
    yeah sounds about right but maybe you should see if the togglepause function works ok first? Seeing as the sound is not linked to a scene or anything it should just continue to play between scenes, until you stop it no?
  6. · 13 years ago
    Exactly. I am trying to get the pause thing to work. Until now I get it to pause but it doesn't start again... at least not where I paused it. Maybe I am just doing it wrong... not saving the sound property in a variable correctly. On you wiki site at the end there is a print sting... that is how you save the properties and later on you just recall them? I am sorry for my stupid question... I just have no idea how things work... I am trying to get my head around it.
  7. · 13 years ago
    print is just for printing messages into the log. more for debugging.

    which wiki article are you looking at?
    I was talking about this one: http://wiki.visionaire-tracker.net/wiki/ToggleSoundPause

  8. · 13 years ago
    Yeah that one.

    I am still trying to get the thing working in the same scene... without jumping to another one. Just to understand how things work.

    Its a cut-scene.

    I have one script at the beginning of the scene.

    
    local song = startSound("vispath:data/audio/tellisis/sounds/song.ogg")
    


    Then I have another one in the middle of the cutscene that pauses the song.

    
    local song = getSoundId("vispath:data/audio/tellisis/sounds/song.ogg")
    toggleSoundPause(song)
    
    


    And close to the end I put the second script again because I thought it would toggle between pause and playing the sound. But nothing happens. roll
  9. · 13 years ago
    you don't need to do the local variable for the start sound.

    if you wanted you could do..
    local sound1 = "vispath:data/audio/tellisis/sounds/song.ogg"
    startSound(sound1)
    

    or...
    startSound("vispath:data/audio/tellisis/sounds/song.ogg")
    

    for the id you are better naming it something like this...
    local sound1_id = getSoundId("vispath:data/audio/tellisis/sounds/song.ogg")
    -- or if you have stored the path in a variable
    local sound1_id = getSoundId(sound1)
    

    etc...
  10. · 13 years ago
    ok I tried it and well:

    1. option:

    script 1
    local sound1 = "vispath:data/audio/tellisis/sounds/song.ogg"
    startSound(sound1)
    


    script 2
    local sound1_id = getSoundId(sound1)
    toggleSoundPause(sound1_id)
    


    The sound starts but does not stop.

    2. option

    script 1
    startSound("vispath:data/audio/tellisis/sounds/song.ogg")
    


    script 2
    local sound1_id = getSoundId("vispath:data/audio/tellisis/sounds/song.ogg")
    toggleSoundPause(sound1_id)
    


    The sound starts and stops.

    If I understand all of this correctly.

    In option 1 the first script. defines sound1 as a variable and startSound(sound1) calls this variable and well starts the sound. Now the pause script defines a new variable sound1_id which is sound1 but somehow it does not find it or something because it does not pause the sound.
  11. · 13 years ago
    Can it be that local sound1 = "vispath:data/audio/tellisis/sounds/song.ogg" is just a local variable and thats why I cannot call it from another script?

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?