Frictional Games Forum (read-only)
Slam door and lock - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Slam door and lock (/thread-21461.html)



Slam door and lock - Hauken - 05-11-2013

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....


RE: Slam door and lock - Romulator - 05-11-2013

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


RE: Slam door and lock - Hauken - 05-11-2013

Thank you for such an motivational post!

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