ActivatorSound

From ZDoom Wiki
Jump to: navigation, search
Note: This function has been superseded by PlaySound, which duplicates and extends its functionality. Use of the newer function is advised in order to maintain maximum flexibility in your code.


void ActivatorSound(str sound, int volume);

Usage

Plays a sound from whoever activated the script (be it a monster, the player or projectile).

Parameters

  • sound: The sound to be played, as defined in SNDINFO.
  • volume: An integer range from 0 to 127, with 127 being full volume and 0 being muted.

Examples

 script 4 (void) {
   ActivatorSound("misc/i_pkup",127);
   print(s:"Sounds like you got something!");
 }

See also