I've been trying to make a door slam following
THIS tutorial here, from frictional games wiki, but it doesn't work! I could'nt find any mistake... I think this is being caused by the map.cache, that you guys say that causes several issues, so I deleted it, but every time I go test the level, another file is created!
Here's the map.cache:
void OnStart()
{
AddEntityCollideCallback("Player", "script_bam", "func_bam", true, 1);
}
void func_bam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("door1", 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);
}
Please help me!