11-12-2013, 12:22 PM
Hello. I have a custom story, when entering a area, it will override the level music, and start a sound that is looping.
I have made a sounds folder in my custom story map. redist->custom_stories->My map name->sounds. I have in the sound folder general_piano03.ogg, and the general_piano03.snt file. This is the general_piano03.snt code:
I have tried rename the "general_piano03" to general_piano03.snt, with no results.
I have changed the Loop="True", and the Prioirity="2". When i enter the area, where i want the sound to begin, the sound will begin, but it wont override the level music, and it wont loop. I have the level music priority to 1.
Here is the script that is used in this event:
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)
{
PlaySoundAtEntity("piano", "general_piano03.snt", "livingroomarea", 1, false);
}
I don't know if i have missed something, but any help would be highly appreciated!
I have made a sounds folder in my custom story map. redist->custom_stories->My map name->sounds. I have in the sound folder general_piano03.ogg, and the general_piano03.snt file. This is the general_piano03.snt code:
Spoiler below!
<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="general_piano03" />
</Main>
</SOUNDS>
<PROPERTIES Volume="10" MinDistance="2" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="2" />
</SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="general_piano03" />
</Main>
</SOUNDS>
<PROPERTIES Volume="10" MinDistance="2" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="True" Use3D="True" Blockable="False" BlockVolumeMul="0.8" Priority="2" />
</SOUNDENTITY>
I have tried rename the "general_piano03" to general_piano03.snt, with no results.
I have changed the Loop="True", and the Prioirity="2". When i enter the area, where i want the sound to begin, the sound will begin, but it wont override the level music, and it wont loop. I have the level music priority to 1.
Here is the script that is used in this event:
Spoiler below!
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)
{
PlaySoundAtEntity("piano", "general_piano03.snt", "livingroomarea", 1, false);
}
I don't know if i have missed something, but any help would be highly appreciated!