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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true)
Jumpman Offline
Junior Member

Posts: 31
Threads: 10
Joined: May 2011
Reputation: 0
#8
RE: Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true)

First you need to go into the editor and click on the door and set "locked",
then you need to replace you scripting part where you have "UsedKeyOnDoor" and write the name of you key.. So it sould look like this..


void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "Usedawsomekey_1", true);
}

void Usedawsomekey_1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("awesomekey_1");
}



Hope it helped Smile
05-09-2011, 12:59 PM
Find


Messages In This Thread
RE: Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true) - by Jumpman - 05-09-2011, 12:59 PM



Users browsing this thread: 1 Guest(s)