Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Restart background music.

  • #1, by ke4 11 years ago Zitieren
    Hi, can i somehow restart background music? Let it play from the beggining?
    Thanks
  • #2, by afrlme 11 years ago Zitieren
    Why would you want to do that? You could try using the set background music action part to set it to empty, then setting it again to the music you want.

    Not tested, so let me know if it works.
  • #3, by ke4 11 years ago Zitieren
    I have this sequence in the game it's a couple of scenes where is playing the same music. It needs to be going through and if the player fails, then the sequence starts from the beggining.

    It works when i set it to nothing and then must be a short pause and then if i set again it starts from the beggining.

    But because it's changing into this scene first there can be always heard a few ms before the restart. Doesn't work if i set it to nothing in different scene for some reason, in that case it continues normaly.
  • #4, by afrlme 11 years ago Zitieren
    You can define the background music for any scene using action parts or Lua script I believe. A little while ago in another thread I provided a solution / idea for how to have it continue the music from the previous scene into the next scene without it pausing / restarting. The reason they wanted this is because they had it play a random background music from a small list of background musics just to add dynamic score that only played after a random amount of time with a pause in between each score where nothing was played at all.
  • #5, by ke4 11 years ago Zitieren
    Er.. i'm not sure if i follow you here...

    I have "round 1, round 2, round 3" etc for every round a new scene, all scenes has the same background music. ( set in properties tab ) there are some time limitled puzzles and on fail it goes to the round 1 restarted again, all i need is to restart the music too.

    What do you mean? How to continue music or sound?
  • #6, by afrlme 11 years ago Zitieren
    I didn't follow your reply too well either, I guess! grin

    oh dear.

    I didn't understand the: "But because it's changing into this scene first there can be always heard a few ms before the restart." part.
  • #7, by ke4 11 years ago Zitieren
    Sorry mate, I'm having a bit of an off day today grin

    Immagine that there is string of scenes, you are in some of the scenes and then you won't do the task in time so it will puts you back to the first scene.
    And there is playing the music and even the first action part in the "at beggining of scene" is removing the background music, the music still plays for a few miliseconds before it's ended.
  • #8, by afrlme 11 years ago Zitieren
    Ah use an if query or something inside of the action part that resets back to the first scene to determine if it should remove the music from the scene before restarting. If the background music is stopped before swapping back to the initial scene then it should start the music from the beginning automatically I think.
  • #9, by ke4 11 years ago Zitieren
    No it still continue the music ( or sometimes it doesn't play at all )
    Eh what the hell it doesn't have to play from beggining, it's just a extra feature.
  • #10, by afrlme 11 years ago Zitieren
    Nothing in the log?
  • #11, by ke4 11 years ago Zitieren
    No.
    The thing is that it's a couple of scenes with same bg music which includes dozens of movies and before&after each video it changes volume of the bg music + the restarting thing. No wonder it's so messy.
    Sure i can't make a classic adventure game.