Frictional Games Forum (read-only)
Problem Locking A Door - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Problem Locking A Door (/thread-7248.html)



Problem Locking A Door - Yahtzee - 04-08-2011

Hey Everyone,

Here's the scenario: An enemy smashes a locked door and into a room. If he kills the player, the player respawns in the room. I want the door to come back locked.

I've managed to spawn the door, but it doesn't lock.

This code is in a function called on player death:

Code:
CreateEntityAtArea( "mansion_1", "mansion.ent", "door_pos_1", false );
SetSwingDoorLocked( "mansion_1", true, false );

The door gets spawned backwards(180 degrees on the Y axis), but other than that, nothing seems amiss. What am I missing?

Thanks!


RE: Problem Locking A Door - Russ Money - 04-08-2011

What i would do, as a work-around, is make two doors, one on top of another. The original door that gets smashed, and set the other to active once the player dies. You can set the inactive door locked and go from there.


RE: Problem Locking A Door - Yahtzee - 04-08-2011

There's a command I found, literally one minute after I posted:

Code:
void ResetProp(string& asName);

It resets the prop to the state at level load. Derp :/