Music and AGS 3.2.1

Started by Dave Gilbert, Thu 01/12/2011 16:31:54

Previous topic - Next topic

Dave Gilbert

Hi everyone.  This seems like it should be a pretty common problem with anyone upgrading an old game to the latest version of AGS, but I can't seem to find any threads about it.  So forgive me if it's been brought up before.

So, I'm upgrading Blackwell Convergence, which was released in 2009 and used an older version of AGS.  I forget which one, but allowed you to set the room's background music via the room editor.  When I brought the game into 3.2.1, various .Play() commands were added to the "before fadein" function to replicate it.

However, now the music just plays for 1-2 seconds before stopping completely.  I'm not sure why it does this, since I was able to upgrade Blackwell Legacy and Unbound (which were made even earlier than this one) with no problems whatsoever.  Any ideas are appreciated!

-Dave

monkey0506

#1
Hey Dave,

Would you object to showing the room scripts? You can PM me if you don't want to post it here.

P.S. This is exciting news. 8)

Edit: Things to check:

- Does the audio file play correctly in the editor?
- Are there any calls to AudioClip.Stop, AudioChannel.Stop, or Game.StopAudio that might have been added? You can now search the entire project from an open script file (ie., search for ".Stop").
- What does the AudioType of the trouble clips show as?
- Do the audio clips in question have specific values in any of their properties, or do they only "Inherit" from the audio type?
- What are the properties of the audio type for these clips?

You may have the audio types set to the same thing and be hitting the maximum number of concurrent clips of that type. This seems a fairly likely culprit as well.

Dave Gilbert

Hm.  I changed the code to the presumably obsolete code and it worked fine.

For example, if I had originally set up a room to play music #3 in the room editor, AGS 3.2.1 generated the command aMusic3.Play(); at the top of the room's "before fadein" function.

But I went in and change it to PlayMusic(3); and it worked fine.

So, nevermind!  I sorted it out on my own.  Thanks anyway. :)

monkey0506

If you need further help, always feel free to ask! ;)

I'd be interested in figuring out why the new-style commands are giving you problems, but as long as you've got it working, I understand that your primary interest is updating the underlying engine version.

SMF spam blocked by CleanTalk