Frictional Games Forum (read-only)

Full Version: Sounds are not playing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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

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.