0 Favourites

Change Music Automatically

  • How do I make music change during the gameplay automatically. For example When 1 song is finished playing another song loads up and plays. And so on and on.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Yeah I want to know this too... How to do playlist whit random play? Maybe whit function...

  • You can't do anything automatic when it comes to programming. You need to code it one way or another.

    As for the random play list.

    Create an array with all the song names. You can also use a CSV and tokenate randomly; instead of random.

    Then create an Event for Audio on End with your "music" tag name.

    Play music file = array(int( random(0, array.width) ) w/tag "music"

    or

    Play music file = trim( tokenate( csv, int( random(0, tokencount(csv,",") ), "," )

    w/tag "music"

    with that during your game when one song ends the other will begin.

    boom easy, and not automatic.

  • You can't do anything automatic when it comes to programming. You need to code it one way or another.

    As for the random play list.

    Create an array with all the song names. You can also use a CSV and tokenate randomly; instead of random.

    Then create an Event for Audio on End with your "music" tag name.

    Play music file = array(int( random(0, array.width) ) w/tag "music"

    or

    Play music file = trim( tokenate( csv, int( random(0, tokencount(csv,",") ), "," )

    w/tag "music"

    with that during your game when one song ends the other will begin.

    boom easy, and not automatic.

    jayderyu. Many thanks for your help

  • You can't do anything automatic when it comes to programming. You need to code it one way or another.

    As for the random play list.

    Create an array with all the song names. You can also use a CSV and tokenate randomly; instead of random.

    Then create an Event for Audio on End with your "music" tag name.

    Play music file = array(int( random(0, array.width) ) w/tag "music"

    or

    Play music file = trim( tokenate( csv, int( random(0, tokencount(csv,",") ), "," )

    w/tag "music"

    with that during your game when one song ends the other will begin.

    boom easy, and not automatic.

    I still dont get it can you please post some screenshots? Im not that good with construct 2?

  • Since your new. This link is the best link. Once that is grokked you will get tons of stuff <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    https://www.scirra.com/tutorials/37/beg ... onstruct-2

  • ....grokked...

    I had to look up what this word meant... never have I heard it used... it's from Stranger In a Strange Land... cool reference..

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