DeAngelo
Senior Member
Posts: 263
Threads: 26
Joined: Feb 2013
Reputation:
11
|
RE: Key Doesn't Unlock Door, No Desc or Key Name?
Two things:
Your Lang problem is highlighted in red here:
<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Dare to enter the castle tombs...</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="doorlock1">No need to go back outside...</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key1">room key</Entry>
<Entry Name="ItemDesc_Key1">The key for my room.</Entry>
</CATERGORY>
</LANGUAGE>
and your key not unlocking your door, the problem is highlighted in red here:
void OnStart()
{
AddUseItemCallback("item", "Key1", "masion_Door", "FUNCTION", true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void FUNCTION(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked("masion_Door", false);
PlayGuiSound("unlock.door.snt", 100);
RemoveItem("item");
}
Make those changes and it should work. Oh and the "item" in your RemoveItem at the end should be changed to RemoveItem("Key1"); if you're wanting it to remove the key that unlocked the door. Unless you actually have an item named "item" it won't work.
|
|
05-01-2013, 12:26 PM |
|