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
Safety Gates and Combination
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: Safety Gates and Combination

Did you use the Inventory.hps right then?

This is how the Inventory.hps should look like:

void OnGameStart()
{
    AddCombineCallback("", "drill_bit", "drill_handle", "CombineDrill", false);
    AddCombineCallback("", "drill_bit", "drill_part", "CombineDrill", false);
    AddCombineCallback("", "drill_part", "drill_handle", "CombineDrill", false);
}

void CombineDrill(string &in asItemA, string &in asItemB)
{
    if(GetLocalVarInt("DrillParts") == 3)
    {
        PlayGuiSound("12_make_drill", 1.0f);
    
        RemoveItem("drill_bit");
        RemoveItem("drill_part");
        RemoveItem("drill_handle");
    
        GiveItem("hand_drill_1", "hand_drill", "handdrill", "hand_drill.tga", 0);    
        SetInventoryMessage("Inventory", "MadeDrill", -1);
    }
    else
    {
        SetInventoryMessage("Inventory", "CombineDrillError", -1);
        return;
    }
}

And remember to put it inside your map folder

(This post was last modified: 02-26-2012, 07:46 PM by SilentStriker.)
02-26-2012, 07:29 PM
Find


Messages In This Thread
Safety Gates and Combination - by Alento - 02-26-2012, 06:32 PM
RE: Safety Gates and Combination - by Alento - 02-26-2012, 07:08 PM
RE: Safety Gates and Combination - by Alento - 02-26-2012, 07:25 PM
RE: Safety Gates and Combination - by SilentStriker - 02-26-2012, 07:29 PM
RE: Safety Gates and Combination - by Alento - 02-26-2012, 08:00 PM



Users browsing this thread: 1 Guest(s)