Alento
Member
Posts: 64
Threads: 11
Joined: Jan 2012
Reputation:
0
|
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 Tongue](https://www.frictionalgames.com/forum/images/smilies/tongue.gif) But anyways.. It didn't work :/
And also, what did you mean with deterioration's scripts? ![Smile Smile](https://www.frictionalgames.com/forum/images/smilies/smile.gif)
(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"?
(This post was last modified: 02-26-2012, 08:33 PM by Alento.)
|
|