Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Scripts not working :(
XTM Res Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2013
Reputation: 0
#1
Sad  Scripts not working :(

Hi everyone , im guy whos trying to make an Amnesia custom story , everything works great , but there is problem with keys names and unlocking doors. Maybe its my fault in the scripts or its problem with lang files. The problem is , when i pick up key it says "Picked up" but dont say "Picked up Table Key". And when i try to unlock door it says "Cannon Use This Item This Way". ( I have been making scripts by videos on youtube) I was watching some Threads about it but anything didnt help me Sad Please help Undecided There are the scripts:

extra_english :

<LANGUAGE>
</CATEGORY>
<CATEGORY Name ="Inventory">
<Entry Name="ItemName_tabledoorkey_1">Desk Key</Entry>
<Entry Name="ItemDesc_tabledoorkey_1">Little key for little door</Entry>
</LANGUAGE>

----------------------------------------------------------------------
office.hps :

void OnStart()
{
AddUseItemCallback("", "tabledoorkey_1", "tabledoor_1", "UsedKeyOnDoor", true);
}


void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("tabledoor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "tabledoor_1", 0, false);
RemoveItem("tabledoorkey_1");
}

----------------------------------------------------------------------
06-08-2013, 06:59 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: Scripts not working :(

<LANGUAGE>

</CATEGORY>

<CATEGORY Name ="Inventory">

        <Entry Name="ItemName_tabledoorkey_1">Desk Key</Entry>

        <Entry Name="ItemDesc_tabledoorkey_1">Little key for little door</Entry>

</LANGUAGE>

This bit of code is probably the problem. You're trying to close CATEGORY before it's even been opened. Change it to this:

<LANGUAGE>

<CATEGORY Name ="Inventory">

        <Entry Name="ItemName_tabledoorkey_1">Desk Key</Entry>

        <Entry Name="ItemDesc_tabledoorkey_1">Little key for little door</Entry>
</CATEGORY>

</LANGUAGE>
06-08-2013, 07:44 PM
Find
XTM Res Offline
Junior Member

Posts: 2
Threads: 1
Joined: Jun 2013
Reputation: 0
#3
RE: Scripts not working :(

(06-08-2013, 07:44 PM)Bridge Wrote:
<LANGUAGE>

</CATEGORY>

<CATEGORY Name ="Inventory">

        <Entry Name="ItemName_tabledoorkey_1">Desk Key</Entry>

        <Entry Name="ItemDesc_tabledoorkey_1">Little key for little door</Entry>

</LANGUAGE>

This bit of code is probably the problem. You're trying to close CATEGORY before it's even been opened. Change it to this:

<LANGUAGE>

<CATEGORY Name ="Inventory">

        <Entry Name="ItemName_tabledoorkey_1">Desk Key</Entry>

        <Entry Name="ItemDesc_tabledoorkey_1">Little key for little door</Entry>
</CATEGORY>

</LANGUAGE>

THANK YOU THANK YOU THAAAAAAAAANK YOU Heart Heart Heart
Its working now Big Grin Thx very much
06-08-2013, 07:48 PM
Find




Users browsing this thread: 2 Guest(s)