Please note, this article was written with "newbies" (I call them 'Infant Klikkers') in mind.

Some levels, or screens in a game require the user to view it for a long length of time. When this happens, usually the author of the game will tell the music track for that level to loop 100,000 times or something. While this is perfectly fine, the same music repeated over and over again can get quite monotonous, especially if it's a particularly short MIDI. The answer is quite simple - have several tracks that play one after the other.

In this example, I will have three different music tracks. If you wish to have any more or less, it should be fairly clear what to change after you read the article.

To do this, simply place a counter object out of the play area.

Set MINIMUM to 0
Set MAXIMUM to <total number of music tracks - 1>
Set INITIAL to 0

Let's call the timer "Music Tracks"

Then, jump into the Event Editor and do the following:

Condition:
Start Of Level
Event:
Play music <music 1>

Condition:
"Music Tracks" = 0
+ Music <music 1> is not playing
Event:
Add 1 to "Music Tracks"
+ Play music <music 2>

Condition:
"Music Tracks" = 1
+ Music <music 2> is not playing
Event:
Add 1 to "Music Tracks"
+ Play music <music 3>

Condition:
"Music Tracks" = 3
+ Music <music 3> is not playing
Event:
Set "Music Tracks" to 0
+ Play music <music 1>

There you have it. The tracks will play, one after another, and not just a 'measly' 100,000 times, but for eternity! The only problem with this method is that it will increase the size of your game (unless you use musics that are already used somewhere else in your game), but it shouldn't be by that great an amount.

- Rick