<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.prime-wow.com/index.php?action=history&amp;feed=atom&amp;title=AmbientSoundChangeNight</id>
	<title>AmbientSoundChangeNight - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.prime-wow.com/index.php?action=history&amp;feed=atom&amp;title=AmbientSoundChangeNight"/>
	<link rel="alternate" type="text/html" href="https://wiki.prime-wow.com/index.php?title=AmbientSoundChangeNight&amp;action=history"/>
	<updated>2026-06-07T07:45:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.prime-wow.com/index.php?title=AmbientSoundChangeNight&amp;diff=9&amp;oldid=prev</id>
		<title>Xordac: Created page with &quot;Modify an area&#039;s nighttime soundtrack. &lt;nwscript&gt; void AmbientSoundChangeNight(     object oArea,     int nTrack ); &lt;/nwscript&gt; {{DISPLAYTITLE:AmbientSoundChangeNight(object,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.prime-wow.com/index.php?title=AmbientSoundChangeNight&amp;diff=9&amp;oldid=prev"/>
		<updated>2017-05-23T12:09:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Modify an area&amp;#039;s nighttime soundtrack. &amp;lt;nwscript&amp;gt; void AmbientSoundChangeNight(     object oArea,     int nTrack ); &amp;lt;/nwscript&amp;gt; {{DISPLAYTITLE:AmbientSoundChangeNight(object,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Modify an area&amp;#039;s nighttime soundtrack.&lt;br /&gt;
&amp;lt;nwscript&amp;gt;&lt;br /&gt;
void AmbientSoundChangeNight(&lt;br /&gt;
    object oArea,&lt;br /&gt;
    int nTrack&lt;br /&gt;
);&lt;br /&gt;
&amp;lt;/nwscript&amp;gt;&lt;br /&gt;
{{DISPLAYTITLE:AmbientSoundChangeNight(object, int)}}&lt;br /&gt;
===Parameters===&lt;br /&gt;
;oArea&lt;br /&gt;
:The area whose soundscape you want to change.&lt;br /&gt;
&lt;br /&gt;
;nTrack&lt;br /&gt;
:The 2da reference of the ambient soundtrack to use.&lt;br /&gt;
&lt;br /&gt;
===Description===&lt;br /&gt;
Changes the ambient nighttime soundtrack for oArea to nTrack, where nTrack is an integer reference to an ambient sound track in ambientsound.2da. nTrack can be a literal integer or an [[ambient sound|AMBIENT_SOUND_*]] constant.&lt;br /&gt;
&lt;br /&gt;
===Remarks===&lt;br /&gt;
This function changes ambient sound, not ambient music. Ambient sounds are referenced by ambientsound.2da, while ambient music is referenced by ambientmusic.2da and controlled using [[:Category:Music Effects Functions|music effects functions]]. Also, unlike ambient music files (which appear in the /music directory as *.bmu files), ambient sound files appear in the /ambient directory as .wav files.&lt;br /&gt;
&lt;br /&gt;
This will also turn the ambient sounds back on if they have been turned off.&lt;br /&gt;
&lt;br /&gt;
===Version===&lt;br /&gt;
1.22&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;nwscript&amp;gt;&lt;br /&gt;
// A trigger&amp;#039;s OnEvent script:&lt;br /&gt;
void main() &lt;br /&gt;
{&lt;br /&gt;
    // Stop the music.&lt;br /&gt;
    object oArea = GetArea(OBJECT_SELF);&lt;br /&gt;
    MusicBackgroundStop(oArea);&lt;br /&gt;
 &lt;br /&gt;
    // Change the ambient sound settings.&lt;br /&gt;
    AmbientSoundChangeDay     (oArea, 46);  // al_an_lizrdflk1&lt;br /&gt;
    AmbientSoundChangeNight   (oArea, 46);  // al_an_lizrdflk1&lt;br /&gt;
    AmbientSoundPlay          (oArea);      // In case it&amp;#039;s off&lt;br /&gt;
    AmbientSoundSetDayVolume  (oArea, 100); // In case it&amp;#039;s too quiet&lt;br /&gt;
    AmbientSoundSetNightVolume(oArea, 100); // In case it&amp;#039;s too quiet&lt;br /&gt;
 &lt;br /&gt;
    // Start the music up again.&lt;br /&gt;
    DelayCommand(30.0, MusicBackgroundPlay(oArea));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nwscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
{| class=&amp;quot;seealso&amp;quot;&lt;br /&gt;
| width=&amp;quot;1px&amp;quot; align=&amp;quot;right&amp;quot; valign=&amp;quot;top&amp;quot; | &amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;functions: &amp;lt;/font&amp;gt;&lt;br /&gt;
|[[AmbientSoundChangeDay]], [[AmbientSoundPlay]], [[AmbientSoundStop]], [[SoundObjectPlay]]&lt;br /&gt;
|}&amp;lt;br /&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;gray&amp;quot;&amp;gt;author: Iskander Merriman&amp;lt;/font&amp;gt;&lt;br /&gt;
[[Category:Functions]]&lt;br /&gt;
[[Category:Area_Functions]]&lt;br /&gt;
[[Category:Sound_Effects_Functions]]&lt;/div&gt;</summary>
		<author><name>Xordac</name></author>
	</entry>
</feed>