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
Why is this lock script not working?
Chilton Offline
Member

Posts: 138
Threads: 9
Joined: Sep 2010
Reputation: 0
#1
Why is this lock script not working?

In the level, the key will not unlock the doors. Not even one. And i cant work out why.
Any aid is appreciated.
Quote:void OnStart()
{
AddUseItemCallback("", "KeyLobby", "Door1", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "KeyLobby", "Door2", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "KeyLobby", "Door3", "UsedKeyOnDoor3", true);
}

void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door1", false, true);
PlaySoundAtEntity("", "unlock_door", "Door1", 0, false);
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door2", 0, false);
}

void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door3", false, true);
PlaySoundAtEntity("", "unlock_door", "Door3", 0, false);
}
02-19-2011, 06:45 AM
Find


Messages In This Thread
Why is this lock script not working? - by Chilton - 02-19-2011, 06:45 AM



Users browsing this thread: 1 Guest(s)