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
Locked door script problems. (SOLVED)
evertuy Offline
Junior Member

Posts: 46
Threads: 9
Joined: Mar 2011
Reputation: 0
#1
Locked door script problems. (SOLVED)

(Sorry about the second thread)

So I recently have been studying and watching tutorials about scripting and have gotten a lot better at it. I have my extra_english.lang set up for my key so when I pick it up it says "Iron Key", and the description in my inventory shows up.

So I have a locked door leading to another area so I started scripting to make the key unlock the locked door. I double checked the script and all but it still doesn't work for some reason, it looks right to me. Can someone point out an error?

////////////////////////////
// Run first time starting map
void OnStart()
{
    AddUseItemCallback("", "ironkey_1", "studydoor_1", "KeyUsedOnDoor", true);
}

void KeyUsedOnDoor(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("studydoor_1", false, true);
    PlaySoundAtEntity("", "unlock_door", "studydoor_1", 0, false);
    RemoveItem("ironkey_1");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
[/code]
(This post was last modified: 03-27-2011, 11:24 PM by evertuy.)
03-27-2011, 12:37 AM
Find


Messages In This Thread
Locked door script problems. (SOLVED) - by evertuy - 03-27-2011, 12:37 AM
RE: Locked door script problems. - by Pandemoneus - 03-27-2011, 01:06 AM
RE: Locked door script problems. - by evertuy - 03-27-2011, 01:09 AM
RE: Locked door script problems. - by Pandemoneus - 03-27-2011, 10:14 AM
RE: Locked door script problems. - by evertuy - 03-27-2011, 07:41 PM
RE: Locked door script problems. - by Pandemoneus - 03-27-2011, 10:00 PM
RE: Locked door script problems. - by evertuy - 03-27-2011, 11:17 PM



Users browsing this thread: 1 Guest(s)