void OnStart()
{
AddEntityCollideCallback("Player", "livingroomarea", "music_livingroom", true, 1);
PlayMusic("02_amb_safe", true, 1, 0.1, 1, true);
}
void music_livingroom(string &in asParent, string &in asChild, int alState)
{
PlayMusic("general_piano03.ogg", true, 1, 0.1, 1, true);
StopMusic(3,1); //Stops the music with a fadeout of 3 seconds, and the PRIORITY is 1 like the music.ogg-file.
}
-------------------------
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="general_piano03.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="2" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="1" />
</SOUNDENTITY>
---
The SNT-file ONLY reads SOUND.OGG
Don't put any .snt in there won't work cause you already are INSIDE a snt-file.
ALSO make sure the priority is 1 in the MUSIC file and when your want to stop music, use 1 again.
so if you use priority 5 for music.ogg, use 5 to stop the music.ogg!
-
Extra info, do NOT make more VOLUME then 1, ONLY if nescasary, it will be EXTREMELY loud and probly "explode"the speakers
-