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
I need help with multiple keys
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#5
RE: I need help with multiple keys

Try this:


void OnStart()
{
AddUseItemCallback("", "monsterdoorkey_1", "monsterdoor", "UsedKeyOnDoor", true);
AddUseItemCallback("", "hallwaykey", "HallWayDoor", "UsedKeyOnDoor", true);
}

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

Hope that helped

I rate it 3 memes.
(This post was last modified: 08-11-2012, 01:45 PM by Adny.)
08-11-2012, 01:45 PM
Find


Messages In This Thread
RE: I need help with multiple keys - by Steve - 08-11-2012, 12:06 PM
RE: I need help with multiple keys - by Adny - 08-11-2012, 01:45 PM



Users browsing this thread: 1 Guest(s)