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 and Key Issue
Nitrowing Offline
Junior Member

Posts: 16
Threads: 4
Joined: Dec 2010
Reputation: 0
#1
Question  Locked Door and Key Issue

I've browsed through the various tutorials and searched through these forums for a solution to my Key>Door related issues and failed to find anything that helps, so here goes. It's probably some stupid error but, I need a push in the right direction.

void UseKey("Hotel Room Key, "Hotel Room Door"){
    // Set the entity(desk or door) to unlocked
    SetSwingDoorLocked("Hotel Room Door", false, true);

    // Remove the item used from the inventory
    RemoveItem(Hotel Room Key);
    PlaySoundAtEntity("", "unlock_door.snt", "Hotel Room Door",0.0f, true);
    AddDebugMessage("The Door has successfully opened. Congratulations!", false);
    }


////////////////////////////
// Run first time starting map
  void OnStart()
     {
          if(ScriptDebugOn())
          {
               GiveItemFromFile("lantern", "lantern.ent");
               SetPlayerLampOil(100.0f);

               for(int i = 0;i < 10;i++)
               {
                    GiveItemFromFile("tinderbox", "tinderbox.ent");
               }
          }
     }


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

}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}
}
Any help would be appreciated.
12-22-2010, 12:55 AM
Find


Messages In This Thread
Locked Door and Key Issue - by Nitrowing - 12-22-2010, 12:55 AM
RE: Locked Door and Key Issue - by ThePaSch - 12-22-2010, 04:00 AM
RE: Locked Door and Key Issue - by Nitrowing - 12-22-2010, 05:51 AM



Users browsing this thread: 1 Guest(s)