Frictional Games Forum (read-only)
Sounds are not playing - 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: Sounds are not playing (/thread-10671.html)



Sounds are not playing - lolopon - 10-09-2011

Hi, me again Blush

Ok, now i have tried to make a sound play, and make the character react scared when entering an area, i have setup the script area and i have to assume i have messed up the scripting part somwhere.

Quote: ////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "script_1", "Collidescript_1", true, 1);
}

void Collidescript_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "insanity_baby_cry.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
As the beginner i am, i can't really figure out wheter there is something wrong in the script here.
Care to help out? Angel




RE: Sounds are not playing - Khyrpa - 10-09-2011

I can't see anything wrong in your script, perhaps the sound file names arent right... Does the sanity damage effect happen when you enter the area? If not then your script area is not named right and the Collidescript_1 doesn't trigger at all.