Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → Wav Soundtrack
Wav Soundtrack
2012-04-10, 10:33 AM #1
The result of free time and curiosity.
I've changed the soundtrack cogs so now it plays using wav files, the Power Within episode works perfectly.

Unfortunately the music stops playing after loading a savegame, and I could not find a fix to this. If anyone has any solutions to this problem, please share.


Download link:
http://www.mediafire.com/?uoadf5bt3t4xu5x
2012-04-10, 3:04 PM #2
post code.
幻術
2012-04-10, 6:19 PM #3
Here's a slip from 00_soundtrack.

timer:
if(curMusic != endTrack && start == 0)
curMusic=curMusic+1;
else if(curMusic == endTrack && start == 0)
curMusic=loopTo;

start=0;
i=curMusic-2;
if(cd == 1) musicWav=cd1music02;
if(cd == 2) musicWav=cd2music02;

music=PlaySoundLocal(musicWav, 1, 0, 0x300);
SetTimer(GetSoundLen(musicWav));
return;
2012-04-10, 10:01 PM #4
It stops loading after a savegame? So if the player died in the level, and loaded the last quicksave, would it still work? I don't know whether you mean after a quicksave or loading a saved game from the menu.
Magrucko Daines and the Crypt of Crola (2007)
Magrucko Daines and the Dark Youth (2010)
Magrucko Daines and the Vertical City (2016)
2012-04-11, 2:06 AM #5
From what I remember, some things that are defined in startup: (like WAV soundtracks) won't be loaded again with the savegame. It might be the same with newplayer: because the game just keeps on loading the previous savegame instead of actually creating a new player, but I'm not entirely sure about that
Star Wars: TODOA | DXN - Deus Ex: Nihilum
2012-04-11, 6:30 AM #6
If the player dies and load any savegame the music stops playing.
However, the timer is still active, so after a while the music starts
again.
So I created a item you use to start playing the music.
Only solution I found.
2012-04-12, 12:17 AM #7
Can't you set it to do a 'check' every 10 seconds or so?
Magrucko Daines and the Crypt of Crola (2007)
Magrucko Daines and the Dark Youth (2010)
Magrucko Daines and the Vertical City (2016)
2012-04-12, 7:01 AM #8
I found no way to check if the music is still playing.
2012-04-15, 3:54 AM #9
Originally posted by 40Delta:
I found no way to check if the music is still playing.


There's a COG code 'getsoundlength();' or something, I used it frequently for cutscenes so I wouldn't have to work out how long each .wav file is so mouths would stop moving on time. Perhaps if you 'getsoundlength();' (again, probably not that exactly) the in-question music file every 3 seconds, then if the player had died then it will show up as 0 seconds. In which case have it restart.

That sounded awful. Basically, if you could do a code in which you checked to see if the sound length was less than a second, then to restart it. I hope that makes sense. It just may work.
Magrucko Daines and the Crypt of Crola (2007)
Magrucko Daines and the Dark Youth (2010)
Magrucko Daines and the Vertical City (2016)
2012-04-17, 7:21 PM #10
The GetSoundLen verb returns the length of the wav file, so it will always be the same value until the music changes.
Is there a way to check if the game has been loaded?

↑ Up to the top!