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 doors
Storfigge Offline
Member

Posts: 101
Threads: 31
Joined: Sep 2012
Reputation: 0
#1
Locked doors

Hello!

I am very new with HPL editor and im working on my first custom story. I have no real coding experience but it's gone quite good so far. The problem I have right now is that i first made a locked door and managed to create a key that opens it. Now I've made a new locked door with a key that's suppose to open it. The thing is that when i unlock my first door the second one also unlocks. I can still use my second key on my second unlocked door. I've put the door on locked in the editor so I don't know what the problem is Sad

Here is the code for the doors.


{
AddUseItemCallback("", "key1", "bedroomdoor1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key2", "bedroomdoor2", "UsedKeyOnDoor", true);
}

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

SetSwingDoorLocked("bedroomdoor2", false, true);
PlaySoundAtEntity("", "unlock_door", "bedroomdoor2", 0, false);
RemoveItem("key2");

}

09-21-2012, 09:17 AM
Find


Messages In This Thread
Locked doors - by Storfigge - 09-21-2012, 09:17 AM
RE: Locked doors - by Chap - 09-21-2012, 11:54 AM
RE: Locked doors - by The chaser - 09-21-2012, 01:11 PM
RE: Locked doors - by FlawlessHappiness - 09-21-2012, 01:16 PM
RE: Locked doors - by Storfigge - 09-21-2012, 02:00 PM
RE: Locked doors - by FlawlessHappiness - 09-21-2012, 02:19 PM



Users browsing this thread: 1 Guest(s)