The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Key doesn't work
DoctorNinja88888 Offline
Junior Member

Posts: 3
Threads: 2
Joined: Mar 2014
Reputation: 0
#1
Key doesn't work

Ok so I've been working on a custom story and looked at many tutorials.....on how to make a key that works. I got teh key but it doesn't unlock the door.


I will just post the extra_english.lang file and the script file and other info to easily find help.


The name of my key: Key_1
The name of my door: Door_1

Here is my script file: (Located in maps under my custom story file (The map itself called "Hotel"))

/////////////////////////////////////////
/////////// Run when entering map

void onEnter()

{
AddUseItemCallback("", "Key_1", "Door_1", "UsedKeyOnDoor", true);
}
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, true);
RemoveItem("Key_1");
}


Theextra_english.lang file is located in my custom story file (Hotel) itself and no subfolders after that.

<LANGUAGE>
<RESOURCES>
</RESOURCES>
<CATEGORY Name= "CustomStoryMain">
<Entry Name= "Description">Custom thing</Entry>
</CATEGORY>
<Category Name= "Inventory">
<Entry Name= "ItemDesc_Key_1">This is a key</Entry>
<Entry Name= "ItemName_Key_1">Door Key</Entry>

</CATEGORY>

</LANGUAGE>



Yes my script title is "Hotel.hps"

It is titled correctly, along with CustomSubItem under key.
(This post was last modified: 03-20-2014, 07:22 AM by DoctorNinja88888.)
03-20-2014, 07:18 AM
Find


Messages In This Thread
Key doesn't work - by DoctorNinja88888 - 03-20-2014, 07:18 AM
RE: Key doesn't work - by Straxedix - 03-20-2014, 07:46 AM
RE: Key doesn't work - by Wapez - 03-20-2014, 07:56 AM
RE: Key doesn't work - by DoctorNinja88888 - 03-20-2014, 08:22 PM
RE: Key doesn't work - by Mudbill - 03-20-2014, 08:27 PM
RE: Key doesn't work - by DoctorNinja88888 - 03-20-2014, 11:17 PM



Users browsing this thread: 1 Guest(s)