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
Of Keys and Locked doors...
Ethril Offline
Junior Member

Posts: 7
Threads: 1
Joined: Jan 2011
Reputation: 0
#1
Sad  Of Keys and Locked doors...

Hi guys! was wondering if you could help me with some scripting. I have been trying to get a certain locked door to be opened by a key. However, the key doesn't open the door nor will the door stay locked unless I have the box marked "locked", ticked.

Here are my scripts

extra_english.lang file:


<LANGUAGE>
<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">(story description)</Entry>
</CATEGORY>


<CATEGORY Name="Journal">
<Entry Name="Note_Test01_Name">Dusty Note</Entry>
<Entry Name="Note_Test01_Text">(note text).</Entry>
</CATEGORY>


<CATEGORY Name="Inventory">
<Entry Name="ItemName_StrangeKey">Strange Key</Entry>
<Entry Name="ItemDesc_StrangeKey">Key for a cellar door.</Entry>
</CATEGORY>

</LANGUAGE>


and here is the HPS:

void onStart()
{
AddUseItemCallback("", "strangekey_1", "cellar_wood01_2", "UsedKeyOnDoor", true);
}

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

void onEnter()
{

}


void OnLeave()
{

}


The key works as intended, when picked up it will say you have picked up strange key and it will show in my inventory along with the description but when used on the door that it is supposed to unlock, it will just not work.

Does anyone know what is wrong with my script Sad?
(This post was last modified: 01-12-2011, 07:06 AM by Ethril.)
01-12-2011, 03:27 AM
Find


Messages In This Thread
Of Keys and Locked doors... - by Ethril - 01-12-2011, 03:27 AM
RE: Of Keys and Locked doors... - by Ethril - 01-12-2011, 10:46 AM
RE: Of Keys and Locked doors... - by Neatherblade - 01-12-2011, 11:10 AM
RE: Of Keys and Locked doors... - by Ethril - 01-12-2011, 11:48 AM
RE: Of Keys and Locked doors... - by Neatherblade - 01-12-2011, 12:27 PM
RE: Of Keys and Locked doors... - by Ethril - 01-12-2011, 12:44 PM
RE: Of Keys and Locked doors... - by Ethril - 01-14-2011, 07:47 AM
RE: Of Keys and Locked doors... - by Frontcannon - 01-14-2011, 08:04 PM
RE: Of Keys and Locked doors... - by Ethril - 01-15-2011, 07:03 AM
RE: Of Keys and Locked doors... - by Andross - 01-15-2011, 07:07 AM
RE: Of Keys and Locked doors... - by Vradcly - 02-04-2011, 12:30 AM



Users browsing this thread: 1 Guest(s)