Frictional Games Forum (read-only)
Piano Music Wont Stop?(goto post #4) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Piano Music Wont Stop?(goto post #4) (/thread-12193.html)



Piano Music Wont Stop?(goto post #4) - Tripication - 12-30-2011

Hey there, i'm having problems with some of the custom music im using in my map. Its playing fine and it is playing from the Phonogram entity, but its not very "3D". I do have it set to 3d in the .snt settings but i cant seem to get it to work. i have the volume and distance set as to how i want, but it just doesn't sound real...

Any suggestions?


RE: Surround Sound Custom Music? - flamez3 - 12-30-2011

Can you post the .snt text?


RE: Surround Sound Custom Music? - Tripication - 12-30-2011

(12-30-2011, 06:18 AM)flamez3 Wrote: Can you post the .snt text?
I used the properties from the door_closed.snt



<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="Hanna" />
</Main>
</SOUNDS>
<PROPERTIES Volume="3" MinDistance="0.5" MaxDistance="12" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>


RE: Surround Sound Custom Music? - Tripication - 12-30-2011

Ok, disregard the last idea, I am now following this(to a certain extent) http://www.youtube.com/watch?v=EhUjbK_vEhM

and i have this


void OnStart()
{
AddEntityCollideCallback("Player", "PianoStop", "PianoStop", true, 1);
PlaySoundAtEntity("", "general_piano04", "Piano", 0, false);
}

void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("general_piano04", 0);
}


It is suppose to make the piano sound stop playing when i come into near contact with the piano, but it doesnt stop...

Anything wrong with the script?


RE: Piano Music Wont Stop?(goto post #4) - Apjjm - 12-30-2011

You might need to use the sound's name to identify the sound:

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "PianoStop", "PianoStop", true, 1);
PlaySoundAtEntity("Piano_Sound1", "general_piano04", "Piano", 0, false);
}

void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("Piano_Sound1", 0);
}



RE: Piano Music Wont Stop?(goto post #4) - Tripication - 12-31-2011

(12-30-2011, 03:57 PM)Apjjm Wrote: You might need to use the sound's name to identify the sound:

Code:
void OnStart()
{
AddEntityCollideCallback("Player", "PianoStop", "PianoStop", true, 1);
PlaySoundAtEntity("Piano_Sound1", "general_piano04", "Piano", 0, false);
}

void PianoStop(string &in asParent, string &in asChild, int alState)
{
StopSound("Piano_Sound1", 0);
}
That was it, thanks for that. +1 rep