From ZDoom Wiki
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);


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.


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 )
   // Play a victory noise for all players at full volume
   AmbientSound("handel/messiah", 127);