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:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true)
Yonmaja Offline
Junior Member

Posts: 7
Threads: 3
Joined: Oct 2010
Reputation: 0
#1
Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true)

I've tried everything to get this stupid door to lock and then open with a key, but I just can't.

Here's my exact script:
void OnStart()
{
AddUseItemCallback("", "awesomekey_1", "mansion_1", "UsedKeyOnDoor", true);
}

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

I renamed the key awesomekey_1. I followed MulleDK19's video tutorial (http://hpl2.frictionalgames.com/tutorials) TO THE LETTER, and I still can't get the door to lock. What am I doing wrong?

I searched the forums and couldn't find a solution, even on the "Recollecting Scripts" thread the locking door post there didn't work. And yes, my door is named mansion_1.
10-21-2010, 08:34 PM
Find


Messages In This Thread
Can't get door to lock using SetSwingDoorLocked("mansion_1", false, true) - by Yonmaja - 10-21-2010, 08:34 PM



Users browsing this thread: 1 Guest(s)