08-31-2012, 12:08 AM
Hello, I'm working on an amnesia custom story and I want to know how to make all 3 of these doors explode at once, theres no errors or anything but when i walk by they don't explode 
the names of the doors are: Door smash 1, door smash 2, door smash 3. The area is called door_smash1
This is the scripting, the door slam DOES work, there is no problems there.
void OnStart()
{
AddEntityCollideCallback("Player", "script_slam 1", "func_slam", true, 1);
SetEntityPlayerInteractCallback("door smash 1, door smash 2, door smash 3", "func_slam", true);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("prison1", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetPropHealth("door smash 1, door smash 2, door smash 3", 0.0f);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
Please reply soon!!!! Thanks

the names of the doors are: Door smash 1, door smash 2, door smash 3. The area is called door_smash1
This is the scripting, the door slam DOES work, there is no problems there.
void OnStart()
{
AddEntityCollideCallback("Player", "script_slam 1", "func_slam", true, 1);
SetEntityPlayerInteractCallback("door smash 1, door smash 2, door smash 3", "func_slam", true);
}
void func_slam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("prison1", true, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false); PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetPropHealth("door smash 1, door smash 2, door smash 3", 0.0f);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}
Please reply soon!!!! Thanks
