01-30-2012, 07:32 PM
Hello,
ok so.. i got the key working with all the names and things... problem is.. i cant unlock the door now.. i will place my .HPS file and .lang file here..maybe you can guys help me out !
HPS FILE
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Housedoorkey", "housedoor", "UsedKeyOnDoor", true);
}
void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("housedoor", false, true);
PlaySoundAtEntity("", "unlock_door", "housedoor", 0, false);
RemoveItem(Housedoorkey);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
---------------------------------------------------------
.LANG file
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description"> A young adult searching for his missing dad ENJOY!!</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemDesc_Housedoorkey">"Our main key of our House"</Entry>
<Entry Name="ItemName_Housedoorkey">" Main House key"</Entry>
</CATEGORY>
</LANGUAGE>
Wretic.
ok so.. i got the key working with all the names and things... problem is.. i cant unlock the door now.. i will place my .HPS file and .lang file here..maybe you can guys help me out !
HPS FILE
////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "Housedoorkey", "housedoor", "UsedKeyOnDoor", true);
}
void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("housedoor", false, true);
PlaySoundAtEntity("", "unlock_door", "housedoor", 0, false);
RemoveItem(Housedoorkey);
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
---------------------------------------------------------
.LANG file
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description"> A young adult searching for his missing dad ENJOY!!</Entry>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemDesc_Housedoorkey">"Our main key of our House"</Entry>
<Entry Name="ItemName_Housedoorkey">" Main House key"</Entry>
</CATEGORY>
</LANGUAGE>
Wretic.