I am fully working on my custom story but now I am stuck in one of my script(Key to closet) and this is my script:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddUseItemCallback("", "KeyCloset", "ClosetLock", "UnlockCloset", true);
}
void UnlockCloset(string &in asItem, string &in asEntity)
{
SetEntityActive("ClosetLock", false);
GiveSanityBoost();
PlaySoundAtEntity("", "unlock_door", "Player", 0, false);
RemoveItem("KeyCloset");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
This is my lang file:
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_KeyCloset">This is a hidden key for a closet in the basement </Entry>
<Entry Name="ItemName_KeyCloset">Double spare key</Entry>
</CATEGORY>
My key name is: Keycloset
And my blockbox is named: ClosetLock
Can you see what I am during wrong!!
PLease help