AmbientSoundPlay(object)
From NWN Lexicon
Starts playing the ambient soundtrack of an area.
void AmbientSoundPlay( object oArea );
Contents |
[edit] Parameters
- oArea
- The area that should start playing its ambient soundtrack.
[edit] Description
Starts playing oArea's ambient soundtrack.
[edit] Remarks
Contrast this with MusicBackgroundPlay(), which starts playing the area's ambient music.
You can change the ambient soundtrack for the area using AmbientSoundChangeDay() and AmbientSoundChangeNight().
To stop the soundtrack from playing, use AmbientSoundStop().
[edit] Version
1.22
[edit] Example
// A trigger's OnEvent script: void main() { // Stop the music. object oArea = GetArea(OBJECT_SELF); MusicBackgroundStop(oArea); // Change the ambient sound settings. AmbientSoundChangeDay (oArea, 46); // al_an_lizrdflk1 AmbientSoundChangeNight (oArea, 46); // al_an_lizrdflk1 AmbientSoundPlay (oArea); // In case it's off AmbientSoundSetDayVolume (oArea, 100); // In case it's too quiet AmbientSoundSetNightVolume(oArea, 100); // In case it's too quiet // Start the music up again. DelayCommand(30.0, MusicBackgroundPlay(oArea)); }
[edit] See Also
functions: | AmbientSoundChangeDay, AmbientSoundChangeNight, AmbientSoundStop |
author: Iskander Merriman