07-06-2012, 02:25 PM
I was wondering if it was possible to show a custom-made message when trying to combine two items. Instead of "Combination does not work!" I want it to say "There is no need to combine these two.". I want it this way so when the player picks up a needle and a copper tube they don't instantly try to combine them and get confused when they don't get combined and think the map is bugged. I don't want the copper tube and the needle to get combined, you need them for individual things. The only thing I got so far is;
void OnStart()
{
AddCombineCallback("needle_tube", "hollow_needle", "copper_tube", "nocombineCN", false);
}
void nocombineCN(string &in asItemA, string &in asItemB)
{
//I am not sure if this is the right code for displaying the combining message
SetInventoryMessage("Messages", "nocombine", 5);
}
But when I try to combine the two nothing happens, even the "Combination does not work!" doesn't show up. I double checked and as far as I am aware are the names the same. Some help would be appreciated.
void OnStart()
{
AddCombineCallback("needle_tube", "hollow_needle", "copper_tube", "nocombineCN", false);
}
void nocombineCN(string &in asItemA, string &in asItemB)
{
//I am not sure if this is the right code for displaying the combining message
SetInventoryMessage("Messages", "nocombine", 5);
}
But when I try to combine the two nothing happens, even the "Combination does not work!" doesn't show up. I double checked and as far as I am aware are the names the same. Some help would be appreciated.