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
Door set to locked, but unlocked?
Asaratha Offline
Junior Member

Posts: 14
Threads: 5
Joined: Jul 2011
Reputation: 0
#5
RE: Door set to locked, but unlocked?

(08-01-2011, 08:41 PM)Your Computer Wrote:
(08-01-2011, 08:23 PM)Asaratha Wrote: I didn't, it is set to locked in the level editor.

I know that, but it seems i should have checked your code for more than syntax and function parameter errors. The code logic seems to be wrong.

void KeyOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("keydoor_1", false, true);
    PlaySoundAtEntity("", "unlock_door", "keydoor_1", 0, false);
    RemoveItem("key_1");
    SetSwingDoorLocked("keydoor_2", false, true);
    PlaySoundAtEntity("", "unlock_door", "keydoor_2", 0, false);
    RemoveItem("key_2");
}

So you want both doors to open at the same time when opening either door?

No. It worked before I added the monster if I recall correctly. Both doors are locked, you find the key near the beginning and open the first door. That room leads you to another room with 2 doors, you go through the first (unlocked) door. You get to a destroyed room and you pick up a key that opens the next one in the other room. It also sets up a monster. When you get back to the room, you use the key to unlock the door leading to a kitchen.

BUT, for some reason, the kitchen door (door2) is always unlocked.
08-01-2011, 09:00 PM
Find


Messages In This Thread
Door set to locked, but unlocked? - by Asaratha - 08-01-2011, 04:23 PM
RE: Door set to locked, but unlocked? - by Asaratha - 08-01-2011, 09:00 PM



Users browsing this thread: 1 Guest(s)