SectorSound

From ZDoom Wiki
Jump to: navigation, search

void SectorSound(str sound, int volume);

Usage

Plays a sound in the sector that the line the script is attached to faces. This is a point sound, so anyone far away will not hear it as loudly. Volume is an integer range from 0 to 127, with 127 being full volume and 0 being muted.

Examples

This script generates a creaking sound when walking over a linedef into a sector.

script 1 (void)
{
    SectorSound("world/creak1", 127);
}

To make this all work, be sure you have your linedef action special set to 80 (ACS_Execute), the argument pointed to the correct script number, and activation trigger set to “Player Crosses Line”.