So, I have been trying to get a chemical script to work, but for unknown reasons it says "The combination doesn't work".
My inventory.hps: (The hammer part works perfectly)
//COMBINE HAMMER//
////////////////////
void hammer_chipper(string &in asItemA, string &in asItemB)
{
PlayGuiSound("15_make_hammer", 1.0f);
RemoveItem(asItemA); RemoveItem(asItemB);
GiveItem("stone_hammer_chipper", "Puzzle", "stone_hammer_chipper", "stone_hammer_chipper.tga", 0);
}
//COMBINE EXPLOSIVE CHEMICALS////
void make_explosive(string &in asItemA, string &in asItemB)
{
if (GetLocalVarInt("chemical_dynamite") == 0)
{
GiveItem("chemical_container_half", "Puzzle", "chemical_container_half", "chemical_container_half.tga", 1);
AddLocalVarInt("chemical_dynamite", 1);
RemoveItem(asItemA); RemoveItem(asItemB);
RemoveCombineCallback("Add_var_explosive");
}
if (GetLocalVarInt("chemical_dynamite") == 1)
{
RemoveCombineCallback("Add_var_explosive_1");
AddLocalVarInt("chemical_dynamite", 1);
}
if (GetLocalVarInt("chemical_dynamite") == 2)
{
RemoveCombineCallback("Add_var_explosive_2");
AddLocalVarInt("chemical_dynamite", 1);
}
}
////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
SetLocalVarInt("chemical_dynamite", 0);
/////HAMMER & CHIPPER COMBO/////
AddCombineCallback("hammer_chipper", "stone_hammer_1", "stone_chipper_1", "hammer_chipper", false);
////Before Hall chemicals before mixed
AddCombineCallback("Add_var_explosive", "ingredient_complement_Hexanitrate mannitol", "chemical_container_1", "make_explosive", true);
AddCombineCallback("Add_var_explosive", "ingredient_complement_Silver_acetylide", "chemical_container_1", "make_explosive", true);
AddCombineCallback("Add_var_explosive", "ingredient_complement_plumb_Styphnate", "chemical_container_1", "make_explosive", true);
////Before Hall chemicals after one has been mixed
AddCombineCallback("Add_var_explosive_1", "ingredient_complement_Hexanitrate mannitol", "chemical_container_half", "make_explosive", true);
AddCombineCallback("Add_var_explosive_1", "ingredient_complement_Silver_acetylide", "chemical_container_half", "make_explosive", true);
AddCombineCallback("Add_var_explosive_1", "ingredient_complement_plumb_Styphnate", "chemical_container_half", "make_explosive", true);
////Before Hall chemicals after two have been mixed
AddCombineCallback("Add_var_explosive_2", "ingredient_complement_Hexanitrate mannitol", "chemical_container_half", "make_explosive", true);
AddCombineCallback("Add_var_explosive_2", "ingredient_complement_Silver_acetylide", "chemical_container_half", "make_explosive", true);
AddCombineCallback("Add_var_explosive_2", "ingredient_complement_plumb_Styphnate", "chemical_container_half", "make_explosive", true);
}
I have checked names, they are all the same, and there isn't any .map_cache.
Any ideas?