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 Offering Script Help
Demondays1 Offline
Member

Posts: 57
Threads: 7
Joined: Jun 2012
Reputation: 0
#6
RE: Offering Script Help

(06-25-2012, 11:26 PM)ModestWalrus Wrote: I am trying to get a hang of how to make a key unlock a door, I got the extra_english.lang working but now its just not functioning. If you can help me out, ill love you forever.

Try this:

void OnEnter()

{


AddUseItemCallback("", "Key'sname_1", "Nameofdoor", "UsedKeyOnDoor", true);

}

void UsedKeyOnDoor(string &in item, string &in door)

{

SetSwingDoorLocked("Nameofdoor", false, true);

PlaySoundAtEntity("", "unlock_door", "Nameofdoor", 0, false);

RemoveItem("Key'sname_1");

}

Key's name is the name of the key and nameofdoor is the name of the door you want the key to unlock to.




hope I helped.

Intel HD Lag fix: tiny.cc/pyv1gw
(This post was last modified: 06-26-2012, 03:02 AM by Demondays1.)
06-26-2012, 03:01 AM
Find


Messages In This Thread
Offering Script Help - by GoranGaming - 06-25-2012, 09:11 PM
RE: Offering Script Help - by MaZiCUT - 06-25-2012, 09:13 PM
RE: Offering Script Help - by GoranGaming - 06-25-2012, 09:14 PM
RE: Offering Script Help - by GoranGaming - 06-25-2012, 11:23 PM
RE: Offering Script Help - by ModestWalrus - 06-25-2012, 11:26 PM
RE: Offering Script Help - by Demondays1 - 06-26-2012, 03:01 AM
RE: Offering Script Help - by ApeCake - 06-26-2012, 05:04 PM
RE: Offering Script Help - by GoranGaming - 06-26-2012, 05:42 PM



Users browsing this thread: 2 Guest(s)