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 :-)