I'm pretty new at scripting, and I have a lot of questions. I've read the tutorials, and I know where to find the scripts in the wiki. I mostly need help with proper placement of the scripts, and how to get them to work properly. I have some that work really well thanks to previous threads, but there are some more specific needs for the custom story I'm creating that I still need help with. So I was wondering if there's anyone who is kind enough to lend an ear and a helping hand to a scripting nublet, starting with how to get the doors to a cupboard to fly open when entering the script area. Here's the code that I have for the script already.
void Scare(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("deathcloset", false, true);
GiveSanityDamage(80, true);
PlayGuiSound("react_scare.snt", 0.5f);
PlayGuiSound("insanity_whisper.snt", 0.5f);
PlayMusic("01_amb_darkness.ogg", false, 10, 0.5f, 0, false);
}
I saw somewhere about using the SetSwingDoorClosed script to cause doors to fly open or closed. Have I done this correctly or does it need tweaking?