Plays back a sound.
Required parameters:
value = group_no, sound_no (int, int) group_no and sound_no correspond to the identifying pair that you assigned each sound in the player's snd file. To play back a sound from "common.snd", precede group_no with an "F".
Optional parameters:
volumescale = volume_scale (float) volume_scale controls the volume of the sound. A value of 100 specifies 100% volume, 50 for 50%, and so on. Valid values are from 0 to 100. Defaults to 100.
channel = channel_no (int) channel_no specifies which of the player's sound channels the sound should play on. Only one voice may play on a particular channel at a time. For example, if you play a sound on channel 2, then play any sound on the same channel before the first sound is done, then by default the first sound is stopped as the second one plays. 0 is a special channel reserved for player voices. Channel 0 voices are stopped when the player is hit. It's recommended you play your character's voice sounds on channel 0. If omitted, channel_no defaults to -1, meaning the sound will play on any free channel.
lowpriority = pr (int) This is only valid if the channel is not -1. If pr is nonzero, then a sound currently playing on this sound's channel (from a previous PlaySnd call) cannot be interrupted by this sound.
freqmul = f (float) The sound frequency will be multiplied by f. For example. Setting f to 1.1 will result in a higher-pitched sound. Defaults to 1.0 (no change in frequency).
loop = loop_flag (int) Set loop_flag to a nonzero value to have the sound sample loop over and over. Defaults to 0.
pan = p (int) This is the positional offset of the sound, measured in pixels. If p > 0, then the sound is offset to the front of the player. If p < 0, then sound is offset to the back. Defaults to 0. This parameter is mutually exclusive with abspan.
abspan = p (int) Like pan, except the sound is panned from the center of the screen, not from the player's position. This parameter is mutually exclusive with pan.
Example:
; Plays back sound 2,0 from the player's SND file
type = PlaySnd
value = 2,0
; Plays back sound 5,2 from fight.snd
type = PlaySnd
value = F5,2
Related Triggers:
SndPan (SCTRL) (http://mugenguild.com/forum/topics/sndpan-sctrl-170187.0.html)
StopSnd (SCTRL) (http://mugenguild.com/forum/topics/stopsnd-sctrl-170202.0.html)
Notes:
Prior to version 1.0 RC8, a volume parameter was used instead of volumescale. The volume parameter is no longer supported and is now ignored.
The only thing is to use another channel, it's like an ID for the sounds.
How many channels are you allowed to have in a character? You have -1, 0, then up to 31. Is this correct?
So the channels are
-1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
and if you put 32 there's debug flood saying "ILLEGAL PLAYSND CHANNEL".