Directory: Technical >> Script Lib >> Basics >> Audio.
One could identify music since music sounds since they begin with mus.
You can only play music which is registered on the level. You can find
this music at the end of the corresponding *.dat file. Make sure that you
end each piece of music somewhere. To begin, a piece of music (it is looped)
use the following line: (volume=0.0 mute to 1.0 loudest)
sound_music_start [music] [volume]
To change the volume of a certain music piece (you may play two at once), type:
sound_music_volume [music] [volume] [time]
Time is the time in seconds allowed to make a transition between the two volumes. Leave time blank if you do not want a transition.
To stop a piece of music, use the following function:
Some sounds could be used as dialogs or ambients; however, you should play the sound in
the original format due to consistency and compatibility problems.
You cannot play the same sound in dialog, impulse or ambient use. To play a dialog,
To play a block of sounds you would need to use:
To play an impulse sound (like c04_14_02konoko):
Not all sounds are the same. For example the alarm_loop is looped unless
it is stopped while others don't have to. Ambients are generally unlooped.
To force stop an ambient, you have to use the line:
In the same way, you can change the volume of an ambient:
sound_ambient_volume [ambient] [volume] [time]