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
Script Help Help with a locked doors!
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#2
RE: Help with a locked doors!

You should put bracket between the removeitem and setswingdoor locked
because if they are in the same they will both open.Try this:

void OnStart ()
{
AddUseItemCallback("", "Avain", "mansion_3", "UsedKeyOnDoor", true);
AddUseItemCallback("", "pihan_avain", "mansion_11", "UsedKeyOnDoor2", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem("Avain");
}
void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{

SetSwingDoorLocked("mansion_11", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_11", 0, false);
RemoveItem("pihan_avain")
}

(This post was last modified: 04-23-2012, 07:36 PM by Datguy5.)
04-23-2012, 07:35 PM
Find


Messages In This Thread
Help with a locked doors! - by Viuffuz - 04-23-2012, 07:23 PM
RE: Help with a locked doors! - by Datguy5 - 04-23-2012, 07:35 PM
RE: Help with a locked doors! - by overscore - 04-23-2012, 08:02 PM
RE: Help with a locked doors! - by Cranky Old Man - 04-23-2012, 08:13 PM
RE: Help with a locked doors! - by Viuffuz - 04-23-2012, 08:15 PM
RE: Help with a locked doors! - by Datguy5 - 04-24-2012, 05:34 AM
RE: Help with a locked doors! - by Cranky Old Man - 04-24-2012, 07:15 PM
RE: Help with a locked doors! - by Datguy5 - 04-24-2012, 07:37 PM
RE: Help with a locked doors! - by Cranky Old Man - 04-24-2012, 08:22 PM
RE: Help with a locked doors! - by Stepper321 - 04-25-2012, 02:37 PM
RE: Help with a locked doors! - by SilentStriker - 04-25-2012, 02:48 PM



Users browsing this thread: 2 Guest(s)