A_PlaySoundEx
From ZDoom Wiki
A_PlaySoundEx (string soundname, string channel [, bool loop [, int attenuation]])
Usage
Plays the a sound on the specified channel. Each actor has its own set of channels to play sounds on, so sounds played by different actors will not affect each other. This function allows sounds to be played on a specific channel, which can allow for multiple sounds generated from one actor simultaneously that would normally cut each other off, or other special effects.
Parameters
- soundname: The "nice name" of the sound to play. See SNDINFO for how to define this.
- channel: The channel to play the sound on. Sound played on separate channels will not interfere with each other. Valid values are:
- Auto
- Weapon
- Voice
- Item
- Body
- SoundSlot5
- SoundSlot6
- SoundSlot7
- loop: If true, the sound will play in a continuous loop.
- attenuation: Controls how the sound falls off with distance. Legal values are:
- -1: the sound drops off rapidly with distance.
- 0: the sound plays as normal (default).
- 1: the sound plays at full volume everywhere in the level.
- 2: the sound plays at full volume everywhere in the level and in surround sound.
Examples
Missile:
GRNA A 3
GRNA B 3 A_SposAttack
GRNA C 3 A_PlaysoundEx("Grunt/Attack","Weapon")
GRNA DEFG 3
Goto See

