More Than 2 Music Files

  • Is there a capability to play more than 2 music files right now or shuffle the order?

    I am aware of the "preload" function and the "play" function which work great.

    The problem I ran into it was coding when one music track ends and when the other starts.

    Currently, if one does preload for 2 tracks and play, they play simultaneously, not sequentially.

  • I can't remember how I've played with it in one of my prototypes, but try switching volumes.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you try Audio - On Ending... Play Audio 2

    By the way, you don't really need to preload music in most cases.

  • AmpedRobot

    I set up a similar system in a current project and it works pretty good so far. There are 10 songs in the game; upon import, I renamed them to "1" through "10". The game starts and I call 'Play str(round(random(1,10)))...' and add a condition 'On music ended...' (or whatever tag you give the music) and the action 'Play...' with the same settings that started it off.

    I used a Function in this case; at the start of the layout, the music function is called to play the first random song; when a song ends, the Function is called to start a new random song.

    If you want to stop songs from repeating, add a variable that records the name of the last song played and compare it before starting a new song.

    Take care.

  • Thank you, guys.

    Wasn't aware of this.

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