Comrades in Arms Discussion Board
fadeMusic - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Making (http://forum.ciahome.net/forumdisplay.php?fid=8)
+--- Thread: fadeMusic (/showthread.php?tid=1864)



fadeMusic - Mjolnir - 04-16-2010

Im trying to use this command for a mission Im making, and I want the music to fade in slowly. So Ive got a script called musicvol.sqs which looks like this:

Quote:0.1 fademusic 0
125 fademusic 1
exit
Yet, it just keeps the music at full volume. Im playing the music via the effects tab of a trigger. Any ideas on what Im doing wrong


Re: fadeMusic - Overlord - 04-16-2010

Shouldn't you use values (e.g. 0.00 for silence) instead of binary format?


Re: fadeMusic - Pulverizer - 04-20-2010

1 is interpreted as 1.0 and .1 is 0.1 etc. Leaving out the decimal  point makes no difference to what data type the numerical value will be because OFP numbers are always floating point. I think they're 32-bit, with 24 bits of precision (16,777,216).

The problem is probably caused by the trigger you use. Try using playMusic instead. You can get the music class name from the trigger by saving the mission and then looking at mission.sqm. This works fine for me:

0 fademusic 0
playMusic "Track3"
125 fademusic 1
exit