Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Wed 06/10/2004 15:54:09

Title: Problem with music
Post by: Radiant on Wed 06/10/2004 15:54:09
Problem:
I want to set up the following:
  1.Play music A
  2.Once it's done, check if player did a certain action
  3.If not, return to 1
  4.Play music B

This seems not actually possible in AGS. The best I can come up with is checking IfMusicPlaying() in rep_ex_always, but that doesn't get called if the game is, for instance, blocked by a display() function, so that would cause the music to halt. PlayQueued(B) won't work either since if A repeats, B never gets played.
Title: Re: Problem with music
Post by: Pumaman on Thu 07/10/2004 22:27:28
I suppose the best solution would be an option to make rep_exec_always run even while in a Display() and in dialog options.
Title: Re: Problem with music
Post by: Ishmael on Fri 08/10/2004 06:55:02
I thought it already does that... I stroungly support this too, as 1) in  a litle side-test-thingy-project of mine I use the fire plugin (I'm not far enough yet to put in teh displays and stuff), and I reckon it would look nicer if the flames get going on while a display was on screen, and 2) Exactly what described here, to run checks ever singe game cycle.
Title: Re: Problem with music
Post by: Radiant on Fri 08/10/2004 10:45:20
Good idea.

Or, if that's too annoying to code, what would work is a variable like game.queue_length, that indicates the amount of tunes that can be stored in the queue. By default it is ten (as it is now), but if I were to set it to one, it would solve my problem since then I could use PlayMusicQueued to set the next tune in every occasion.