Frictional Games Forum (read-only)

Full Version: Problem Locking A Door
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.
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 :/