Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Goot on Thu 01/07/2004 22:41:26

Title: Repeating a set of music tracks.
Post by: Goot on Thu 01/07/2004 22:41:26
Is there a way to set it so it goes though 4 different music tracks, goes back and plays them all through again, plays them all through again, and keeps on going? I know you can repeat one music track but I want to be able to repeat a set of 4.
Title: Re: Repeating a set of music tracks.
Post by: Scummbuddy on Thu 01/07/2004 23:54:11
This will be a good start for you.  From the manual:
-------------
PlayMusicQueued
PlayMusicQueued (int music_number)

Queues up MUSIC_NUMBER to be played after the current background music finishes.
This command allows you to build up a playlist of music to be played, one after another. You can call this up to 10 times, to add up to 10 tracks to the playlist.

NOTE: This command uses the current setting of SetMusicRepeat to determine whether the queued track will repeat or not. You can only queue one track while SetMusicRepeat is on (since it will never finish, any further queued tracks would never play).

NOTE: The playlist is cancelled if you call PlayMusic (or use any other Play Music commands such as the Play Music On Room Load feature), or if you call StopMusic.

Example:

SetMusicRepeat(0);
PlayMusic(2);
PlayMusicQueued(3);
SetMusicRepeat(1);
PlayMusicQueued(4);

will play music 2, and then play music 3 after it finishes. After that, music 4 will play and loop continuously.
See Also: PlayMusic, SetMusicRepeat, StopMusic
Title: Re: Repeating a set of music tracks.
Post by: Goot on Fri 02/07/2004 00:06:35
I know that, but I want the whole 4 tracks to repeat over and over, one after another. It's like I want to create a track consisting of all 4 played one after another.
Example:
Track1-track2-track3-track4-track1-track2-track3-track4...
Not:
Track1-track2-track3-track4-track4-track4-track4...
Is there any way to do this?
Title: Re: Repeating a set of music tracks.
Post by: Ashen on Fri 02/07/2004 00:16:47
http://www.agsforums.com/yabb/index.php?topic=14931.0

Similar thing from a little while ago.