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
[SOLVED]Use combined object on door? Mr. Noob wants some help
LankySpankey103 Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2013
Reputation: 0
#1
[SOLVED]Use combined object on door? Mr. Noob wants some help

Hey guys, I am having a little problem. I finally managed to combine my hammer and chipper into an item in my inventory, but when i then want it to i.e. unlock a door, it says "Cannot use the item this way". I would assume that it is the same code as using a key on a door ? Anyways, here is my code from both my inventory.hps and mapname.hps:

void OnGameStart()
{
    AddCombineCallback("hammer_and_chipper", "stone_hammer_1", "stone_chipper_1", "HammerChipper", false);
}

void HammerChipper(string &in item_1, string &in item_2)
{
    RemoveItem(item_1);
    RemoveItem(item_2);
    GiveItem("hammer_and_chipper", "Puzzle", "HammerAndChipper", "hammerandchipper.tga", 1);
}

void OnStart()
{
    AddUseItemCallback("hammer_and_chipper", "hammer_and_chipper", "cellar_wood01_1", "BreakDoor1", false);
    
}

void BreakDoor1(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked("cellar_wood01_1", false, true);
}

Thanks in advance :-)
(This post was last modified: 03-17-2013, 03:52 PM by LankySpankey103.)
03-17-2013, 03:37 PM
Website Find


Messages In This Thread
[SOLVED]Use combined object on door? Mr. Noob wants some help - by LankySpankey103 - 03-17-2013, 03:37 PM



Users browsing this thread: 1 Guest(s)