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
Locked doors
Chap Offline
Member

Posts: 99
Threads: 16
Joined: Jul 2012
Reputation: 2
#2
RE: Locked doors

I'm not so good with code but from my assumption you've put both unlock statements in the same method. So any time someone unlocks bedroomdoor1 or 2, both doors are called to be unlocked. Try making another method for each door. Otherwise if all doors are under this same function, then every door in your level will have the same problem.

Something like this:
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("bedroomdoor2", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor2", 0, false);
RemoveItem("key2");

}


I'm not so great with scripting so this could be the wrong way to do it but this is how I assume it's done properly - If not i'm sure someone will correct me soon =) GL

[Image: 20643.png]
09-21-2012, 11:54 AM
Find


Messages In This Thread
Locked doors - by Storfigge - 09-21-2012, 09:17 AM
RE: Locked doors - by Chap - 09-21-2012, 11:54 AM
RE: Locked doors - by The chaser - 09-21-2012, 01:11 PM
RE: Locked doors - by FlawlessHappiness - 09-21-2012, 01:16 PM
RE: Locked doors - by Storfigge - 09-21-2012, 02:00 PM
RE: Locked doors - by FlawlessHappiness - 09-21-2012, 02:19 PM



Users browsing this thread: 1 Guest(s)