|Warning: The feature described on this page has been deprecated since , and will no longer be supported or updated by the ZDoom developers. While some functionality may be retained for the purposes of backwards-compatibility, authors are strongly discouraged from utilizing this feature in future maps and to instead use A_PlaySound. Compatibility with future ZDoom versions is not guaranteed.|
A_PlaySoundEx (soundwhattoplay, string slot [, bool loop [, int attenuation]])
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.
- whattoplay: The “nice name” of the sound to play. See SNDINFO for how to define this.
- slot: The channel to play the sound on. Sound played on separate channels will not interfere with each other. Valid values are:
- 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.
Missile: GRNA A 3 GRNA B 3 A_SposAttack GRNA C 3 A_PlaysoundEx("Grunt/Attack","Weapon") GRNA DEFG 3 Goto See