LocalAmbientSound: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
(Created page with "'''ACS function''' void LocalAmbientSound(str sound, str volume) Starts an ambient sound that can only be heard by the activator, normally a player. Category:ACS")
 
No edit summary
 
Line 1: Line 1:
'''ACS function'''
{{ACSFunction|description=Starts an ambient sound that can only be heard by the activator, normally a player.
 
|usage=''void'' '''LocalAmbientSound'''(''str sound'', ''int volume'')
void LocalAmbientSound(str sound, str volume)
|parameters=
 
*''sound'': name of [[sound]] to play.
Starts an ambient sound that can only be heard by the activator, normally a player.
*''volume'': volume of sound to play, range 0-127.
 
|examples=
[[Category:ACS]]
This causes the final boss chant to be heard in activator's head. Other players won't hear it:
LocalAmbientSound("bossit", 127);
|notes=
This effect is "local" to the activator. Only the activator will hear the sound. Given that currently only players can listen to sounds, this function only makes sense if triggered by a player.
|id=ACC internal}}

Latest revision as of 10:56, 21 November 2020

Description[edit]

This is an ACS built-in function.

Starts an ambient sound that can only be heard by the activator, normally a player.

Usage[edit]

void LocalAmbientSound(str sound, int volume)

Parameters[edit]

  • sound: name of sound to play.
  • volume: volume of sound to play, range 0-127.

Return value[edit]

Examples[edit]

This causes the final boss chant to be heard in activator's head. Other players won't hear it:

LocalAmbientSound("bossit", 127);

Notes[edit]

This effect is "local" to the activator. Only the activator will hear the sound. Given that currently only players can listen to sounds, this function only makes sense if triggered by a player.

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

See also[edit]