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


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

Posts: 31
Joined: May 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Post Reply 


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



User(s) browsing this thread: 1 Guest(s)