Frictional Games Forum (read-only)

Full Version: When Key Picked Up It Says Picked Up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I Have Done a Key Script for a door but when i pick up the key it just says 'picked up' and in the description it doesn't say anything can someone please tell me what i am doing wrong In Level Editor the Key is called 'hallkey' and the door 'halldoor' and in the entity tab on the key i put customsubitemname to 'hall_key' so could u help?
LANG
<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">
You are Inside This strange House that you entered after hearing screams from inside </Entry>
</Entry>
</CATEGORY>
</CATEGORY Name="Inventory">
<Entry Name="ItemName_hall_key">Hall Key</Entry>
<Entry Name="ItemDesc_hall_key"> Key Labeled "Hall Key"</Entry>
</CATEGORY>
</LANGUAGE>
and the script works but here it is for anyone who wants a working one.

{
AddUseItemCallback("", "hallkey", "halldoor", "hallkeydoor", true);
}

void hallkeydoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("halldoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "halldoor", 0, false);
RemoveItem("hallkey");
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
}

You have </CATEGORY Name="Inventory">
Remove the /.
(02-03-2012, 05:28 AM)Obliviator27 Wrote: [ -> ]You have </CATEGORY Name="Inventory">
Remove the /.
It Is Still The same
Remove the second </Entry> for the Description entry.
^ Missed that.
(02-03-2012, 06:23 AM)Obliviator27 Wrote: [ -> ]^ Missed that.
Thanks So MuchBig Grin i was wondering why there was no description either. +rep for you Tongue

and for Your Computer
Yeah, the whole .lang file just fails if there's even one single typo in the important part of the code or anything like that. Kinda sucks.