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'm probably missing something but this door won't unlock
modoscar Offline
Junior Member

Posts: 9
Threads: 3
Joined: Jun 2012
Reputation: 0
#2
RE: I'm probably missing something but this door won't unlock

(06-18-2012, 02:36 PM)liamthespy Wrote: AddUseItemCallback("", "kitchenkey", "kitchendoor", "Kitopen", true);
}

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

I've checked over the syntax and the names like 100 times, what am I missing? it's just a simple key-opens-door situation and I've done it a million times, why is this not working?
You dont have any void onstart,

void OnStart()

{
AddUseItemCallback("", "kitchenkey", "kitchendoor", "Kitopen", true);

}

void kitopen(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("kitchendoor", false, true);
PlaySoundAtEntity("", "unlock_door", "kitchendoor", 0, false);
}

You can also add: RemoveItem("kitchenkey"); so that the key disappears from the players inventory.
(This post was last modified: 06-18-2012, 02:46 PM by modoscar.)
06-18-2012, 02:45 PM
Find


Messages In This Thread
RE: I'm probably missing something but this door won't unlock - by modoscar - 06-18-2012, 02:45 PM



Users browsing this thread: 1 Guest(s)