Forum rules - please read before posting.

Sound on change scene issue

I have a sound constantly playing in a scene, and on enter the sound is instantly changed to 0, however, there is always a quick split second of the sound before it is then changed to 0, anyway to avoid this?

The reason i need it constantly playing, as it is a radio, that if you leave on from leaving a scene, it plays from where you left it rather than the sound starting from the beginning on its loop

Comments

  • edited February 2016
    I solved this by:

    a) making sure the sound source is not play on start.
    b) in the onstart action. make a ActionList: Run in Parallel
    c) create and place a cutscene in one of the slots of run-in-parallel, name it Play Sound
    d) in this Play Sound cutscene give it a start delay of 0.1
    e) then use Sound: Play - and set the sound to play.

    Hope you can follow these steps.

    I find run in parallel really good for doing many thins at the same time on a scene start like, hiding objects, setting animations of npc's as well as starting all the sounds.

    Its really easy to copy the Ruin in Parallel from within OnStart and paste it into the OnLoad and load is done too then :D
  • Will this ensure that the sound plays from where it left off when I was last in the scene though?
  • To save the position of an audioclip, attach the RememberSound component.  Section 9.2 of the Manual.
  • Hi, I looked at this and it still doesnt work, i have a variable that asks whether the radio is playing when entering a scene, so, if you turn the radio on and leave the scene, and return i want the radio to still be playing, from where it left of, or, even better, to have been playing in real time so it is where it would be in it's loop naturally in time.

    Which do add the remember sound hotspot to? the sound object, the interaction of 'use radio; or the radio hotspot?
  • and would i need to attach the sound to the hotspot, or have it as a seperate sound that is turned on in the use radio interaction?
  • i think its the object with the audio source, and make sure there is a sound script on it too.
  • You add "Remember Sound" to your Sound object - just as the Manual explains.  The Sound object should be separate to the Hotspot and Interaction.
  • I have a Remember Sound added to my sound object as the manual explains, but on re-entering the scene, with variable set to radio play on, it doesn't continue to play.

    My on start radio play variable check is:

    variable check:

    radio on

    true - play radio sound > object visible radio play

    false - stop radio sound > object invisible radio play

    when radio is turned on, radio use, the radio plays radio sound and sets variable to true

    didn't work


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.