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
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#7
RE: Safety Gates and Combination

(02-26-2012, 07:29 PM)SilentStriker Wrote: 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
hm.. weird.. I did exactly as you did, and still it didn't work... I wish the TDD inventory would help, but it so much that I don't understand xD SO MESSY Tongue But anyways.. It didn't work :/

And also, what did you mean with deterioration's scripts? Smile
(02-26-2012, 07:29 PM)SilentStriker Wrote: 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
maybe I should just have something else to open the freaking door... ^^

Do you know anything about the "safety door"? Smile

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
(This post was last modified: 02-26-2012, 08:33 PM by Alento.)
02-26-2012, 08:00 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 Alento - 02-26-2012, 08:00 PM



Users browsing this thread: 1 Guest(s)