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
2 keys
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#2
RE: 2 keys

Took a bit to realize, but once I re-read your key isn't working on the door, something is up with the AddUseItemCallback:

//___________________
void OnStart()

{
AddUseItemCallback("", "doorway", "mansion_4", "FUNCTION", true);
AddUseItemCallback("", "floortwokey", "mansion_9", "UsedKeyOnDoor", true);
}

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

//_________________________

Turns out you have the wrong name of the key in the AddUseItemCallback. I believe it should be "doorkey", NOT "doorway".
12-12-2011, 02:11 AM
Find


Messages In This Thread
2 keys - by aqfitz622 - 12-12-2011, 01:56 AM
RE: 2 keys - by Statyk - 12-12-2011, 02:11 AM
RE: 2 keys - by aqfitz622 - 12-12-2011, 05:29 AM
RE: 2 keys - by Your Computer - 12-12-2011, 05:33 AM
RE: 2 keys - by Statyk - 12-12-2011, 09:38 PM
RE: 2 keys - by nemesis567 - 12-12-2011, 10:05 PM
RE: 2 keys - by Your Computer - 12-13-2011, 01:35 AM
RE: 2 keys - by nemesis567 - 12-13-2011, 01:37 AM
RE: 2 keys - by irockpeople1 - 01-01-2012, 07:31 PM



Users browsing this thread: 1 Guest(s)