Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem Locking A Door
Yahtzee Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2011
Reputation: 0
#1
Problem Locking A Door

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:

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!
04-08-2011, 06:41 AM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#2
RE: Problem Locking A Door

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.

04-08-2011, 06:44 AM
Find
Yahtzee Offline
Junior Member

Posts: 2
Threads: 1
Joined: Apr 2011
Reputation: 0
#3
RE: Problem Locking A Door

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

void ResetProp(string& asName);

It resets the prop to the state at level load. Derp :/
04-08-2011, 06:48 AM
Find




Users browsing this thread: 2 Guest(s)