Hi I would like to know what's wrong with this. The door isn't locked and the key shows up without name and description. Please help.
//===========================================
// Starter's Script File!
//===========================================
//===========================================
// This runs when the map first starts
void OnStart()
{
AddUseItemCallback("", "firstdoorkey1", "firstdoor", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("firstdoor", false, true);
PlaySoundAtEntity("", "unlock_door", "firstdoor", 0, false);
RemoveItem("firstdoorkey1");
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
This is my .lang file:
<LANGUAGE>
<CATEGORY Name="TutorialStory">
<Entry Name="Description">This is a tutorial story. [br] [br]I hope you like it!
</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_firstdoorkey>"Key to First Door"</Entry>
<Entry Name="ItemName_firstdoorkey>First Door Key</Entry>
</CATEGORY>
<CATEGORY Name="Journal">
<Entry Name="Note_Introduction_Name">Welcome.</Entry>
<Entry Name="Note_Introduction_Text">You shall die...</Entry>
</CATEGORY>
</LANGUAGE>