Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Vaz on Mon 06/09/2004 16:51:02

Title: [SOLVED] Stop that track!
Post by: Vaz on Mon 06/09/2004 16:51:02
Hi all,
it's my very first post here (though I've been wandering 'round the AGS galaxy for 3-4 years now) and it's sad for me to begin writing here boring all of you with a problem I should have solved by myself, but I tried searching the forum and didn't find and answer for it.

So, let's go straight to the point. In room A there's music1.mp3 starting off and it goes thru rooms B and C, then it goes back to room A, where the game should actually start. The problem is that I want to stop that track playing after its end (it lasts 22 seconds), end that occurs a few secs after the game's back to room A, but it starts over again instead!

If I put, obviously, the command StopMusic(), it halts immediately and it doesn't wait for the song to end, that is what I want to happen, actually. I went through the manual but I didn't find, or figure out, a solution for my problem.

I'll be VERY grateful to all of you who will help me solving this pretty easy (I bet it is) problem.

Thanks!

Vasco "Vaz" Serafini
Title: Re: Stop that track!
Post by: Snarky on Mon 06/09/2004 17:15:51
Put the line
SetMusicRepeat(0);  // Don't loop music
before you start the track
Title: Thanks!
Post by: Vaz on Mon 06/09/2004 17:23:21
Great! Thanks a lot, Snarky!

Case closed.