How to use Ambiant sound in your room.
I did some experiments with getting the ambiant sound to work on a room. I found a way to do it but it will only play the file till it ends.
Actualy i found how to play 2 sounds. First 1 will be the Music controlled by the music slider in your settings. The second will be the ambiant controlled by the ambiant slider in your settings.
First thing to do is add some folders to your addons\room folder that will hold the sound file.
They will look like this:
The Sound folder is the one to add.
Inside the Sounds folder we make 2 new folders.
Luder will be for the ambiant sound.
Shared will be for the Music sound.
Inside the Luder folder make a folder:
Do the same for the Shared folder.
You no should have the following paths:
Sounds\Luder\Music
Sounds\Shared\Music
Inside the Luder\Music\ you need to make the file: Ambiant.ogg
Inside the Shared\Music\ you need to make the file: Background.ogg
now lets add the script code:
Go to scripts\Luder\common folder im working on room 134 so for me it looks like this:
im gonna open KlubExileRoom134.bs with notepad ++
Add the red text and save the file.
2 more to do.
Go back to scripts\Luder and go to the room folder. in there you will find the following files.
Open AcRoom.bs with notepad ++
Add the red part and save the file.
Now the last one AVRoom.bs
Open AvRoom.bs with notepath ++
Add the red part to your file and save.
This will start the files to play on room loading.
Here is how i think it works.
The Sound folder is the place that stores the files split by Music and Ambiant. or Shares and Luder.
In the room description file we open the soundfile and add the ambiant file and mix them.
In the ACRoom.bs we import the soundfile for the Ambiant sound to add it and it can be executed by the room description file.
In the AVRoom.bs we give it the start to play the ambiant file. The Music file will play because we open it in the room description file.
.BackgroundSounds [ :BGsound01, RoomSound :Ambient . { = call on backgroundsound and play background sound and ambiant sound. if you set this the background sound will be overriden by the Ambiant. .BackgroundSounds [ :BGsound01, RoomSound :BGsound01 . { This is because we have set the roomsound(ambiant) to be the same as backgroundsound(Music)
.NodeName "Sound_Ambient";
.VolumeDB F32(-20);
.Loop True; = loop does not work
};