AmbientSound

From ZDoom Wiki
Revision as of 01:50, 1 March 2013 by Deded007 (talk | contribs) (links)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This page is for the ACS function. You might be looking for the actor instead.

void AmbientSound(str sound, int volume);

Usage

Plays a world sound (all players can hear it at the same volume, regardless of how close to the activator they are). Volume is an integer range from 0 to 127, with 127 being full volume and 0 being muted.

Examples

This script waits for all monsters tagged with tid 1 to die, and the plays a victory fanfare sound which is audible to all players, regardless of where they are.

script 1 (void)
{
   // Wait for all tid 1 monsters to die
   while( ThingCount(T_NONE, 1) > 0 )
   {
      delay(4);
   }
 
   // Play a victory noise for all players at full volume
   AmbientSound("handel/messiah", 127);
}