Comrades in Arms Discussion Board

Full Version: fadeMusic
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Shouldn't you use values (e.g. 0.00 for silence) instead of binary format?
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