Frictional Games Forum (read-only)

Full Version: Slam door and lock
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, im working on a chase sequence in my custom story, I've managed to figure out how to slam the door with some creepy effects thanks to the wiki.

I've been trying to get the door locked just after it slams.. But it doesnt work.

Code:
void func_slam(string &in asParent, string &in asChild, int alState)

{
SetSwingDoorClosed("doorslammer", true, true);
SetSwingDoorLocked("doorslammer", false, true);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
PlaySoundAtEntity("", "fear2.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
}

Figured it, sorry for this dumb post.. had to change the false value for locked door...

Im such a noob....
I'll just point it out there.
Don't ever call yourself a noob. It can be used as a put down, and can make you think "Wow im so stupid for missing that". Even the professional coders on this site still make mistakes, missing some of the small things like, forgetting a {, semi-colons, even the </CATEGORY> in the .lang file. Nobody is perfect, and as long as you learn from your mistakes, you can work it all out Smile

Also, don't ever call anything a dumb post. We're all here to help (unless someone wants to troll).

Since you have solved your problem, I hope all goes well. Just make a new thread if you have any more issues. Smile
Thank you for such an motivational post!

I am defintly gonna need some help as i come closer to the end. Smile