Frictional Games Forum (read-only)

Full Version: Piano Music Wont Stop?(goto post #4)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
Can you post the .snt text?
(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>
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?
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);
}
(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