music continues between layouts?

This forum is currently in read-only mode.
From the Asset Store
6 looping tracks to use in your games and projects. These tracks are in the style of the 1960s detective movie genre.
  • I saw someone answer this and said something about audio tags. I don't know what that is though...I want the music to continue between 4 layouts( and loop)...are you supposed to use global variables or something? I am a noob with no programming experience so you'll have to go REALLY slowly...

  • I am pretty sure that unless you ask your music to stop, it will continue to play even when changing layouts. If you just want your music to continuously play throughout the game, you don't really need to use globals. Only use them when you want the music to stop, mute, or switch music tracks.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • if that was the case I wouldn't have posted the topic in this forum... on start of layout i put "autoplay resource from file (loop)" and it doesn't transition to another layout

  • Actually it does automatically continue to play the music when you go to another layout. Few things you might want to have a look at.

    Is your music in the proper music folder? Also you mention "autoplay resource from file(loop)", I don't know what action this is cause I can't find it at all. Are you using the Audio Object? All you need to do is use the "Play" action and select loop. As long as your other layouts do not issue the Audio object any new actions, it will continue to play the music.

  • rekjl

    I think he's using construct classic, not construct 2.


    By default the xaudio2 plugin is not global so it gets destroyed when the layout ends.

    Make the object global (It's an object property) so it won't be destroyed when the layout changes.

    If you do that you next need to make sure there is only one xaudio2 instance. The usual way is to only have it in the first layout your game runs and on none of the other layouts.

  • rekjl

    I think he's using construct classic, not construct 2.

    other layouts.

    Really sorry, I just noticed it was in the Construct Classic section.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)