From M.U.G.E.N Wiki
State Controller: PlaySnd
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:
- volume = volume_level (int)
- Set volume_level to 0 for normal volume, positive for louder, and negative for softer.
- 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.
; 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