ActivatorSound: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "'''ACS function''' void ActivatorSound(str sound, int volume) Starts a sound from script's activator, at the given volume. If there's no activating thing, the sound will be...")
 
No edit summary
Line 1: Line 1:
'''ACS function'''
{{ACSFunction|description=Starts a sound from script's activator, at the given volume. If there's no activating thing, the sound will be ambient.
 
|usage=''void'' '''ActivatorSound'''(''str sound'', ''int volume'')
void ActivatorSound(str sound, int volume)
|parameters=
 
*''sound'': name of sound to play.
Starts a sound from script's activator, at the given volume. If there's no activating thing, the sound will be ambient.
*''volume'': volume at which to play the sound. Valid range is 0-127.
 
|examples=
[[Category:ACS]]
This causes the activator to make the high-pitched player scream at a moderate volume.
ActivatorSound("pdiehi", 100);
|notes=The activator can be a thing or a polyobject. If none of these is the activator, then the sound will be ambient.
|id=ACC internal
|seealso=*[[ThingSound]]}}

Revision as of 10:47, 21 November 2020

Description

This is an ACS built-in function.

Starts a sound from script's activator, at the given volume. If there's no activating thing, the sound will be ambient.

Usage

void ActivatorSound(str sound, int volume)

Parameters

  • sound: name of sound to play.
  • volume: volume at which to play the sound. Valid range is 0-127.

Return value

Examples

This causes the activator to make the high-pitched player scream at a moderate volume.

ActivatorSound("pdiehi", 100);

Notes

The activator can be a thing or a polyobject. If none of these is the activator, then the sound will be ambient.

This function's identification in zspecial.acs is: ACC internal.

See also