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
Link a Key to a Door
Twitchez Offline
Member

Posts: 67
Threads: 17
Joined: Mar 2012
Reputation: 1
#1
Link a Key to a Door

Hey Everyone!

I been trying for a couple of hours now linking a key to a door. I managed to name the key in the way I wanted to, using the extra_english.lang file, but unfortunatley I am unable the key to the door I want to.


////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
PlayGuiSound("break_wood1.ogg", 1);
PlayGuiSound("general_thunder1.ogg", 1);
SetPlayerLampOil(0);
PlayMusic("react_breath1",false,100.0f,0.0f,1,false);
AddUseItemCallback("", "key_1", "door_1", "UsedKeyOnDoor", true);
}

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


If you manage to solve this problem, I would be very grateful [Image: smile.gif]

Cheers!
/Twitchez
03-19-2012, 08:34 PM
Find


Messages In This Thread
Link a Key to a Door - by Twitchez - 03-19-2012, 08:34 PM
RE: Link a Key to a Door - by SilentStriker - 03-19-2012, 08:37 PM
RE: Link a Key to a Door - by Twitchez - 03-19-2012, 08:40 PM
RE: Link a Key to a Door - by SilentStriker - 03-19-2012, 08:45 PM
RE: Link a Key to a Door - by Twitchez - 03-19-2012, 08:51 PM
RE: Link a Key to a Door - by SilentStriker - 03-19-2012, 09:08 PM



Users browsing this thread: 1 Guest(s)