Sorry for the late reply, I hope I'm still in time!
This helps in a way but doesn't really help how I needed because you are still using "player.AddInventory(iItem);" and the game can only have a total of 300 iItems. I'm talking about a way one could avoid several items for each different stage of a reaction such as iRobo (cough syrup), iSyr_Amm (syrup and ammonia), iSyr_Amm_Nap (syrup, ammonia, and naphtha), etc...
Oops, sorry, I misunderstood that :S Not that I can see: But there are ways to circumnavigate this problem. The easiest I can see is, instead of having 1 item per chemical, is to have maybe 10 items called iChemical1, iChemical2 etc. etc. and then assign they're names, properties, quanties and so on via either item properties or structs (personally I prefer structs, as you may have noticed
) for each game. So in game 1, iChemical1 would by Robo, iChemical2 would be NH3 or whatever you assign to them. This way you can have potentially limitless number of chemicals.
This approach needs something along the lines of Khris' code to function however. Although instead of checking InventoryItems, you'd instead check Chemical Names (Strings).
And for that code, how would that help? Wouldn't I have to call that for every step of the extraction since it discusses mixing 2 specific chems with each other to make a 3rd? And would I still have to use it twice so that you can use both items to start the reaction
@(Anyone) is it possible to use an unhandled_event(5,3) function (i.e use inventory on another) and still know both items involved?
Otherwise: I can see no way of minimizing on that, you'll have to use both functions. Or you could find another way around. For example you could make a GUI which displays the inventory items you click on with a "combine" button - that way you only have one function to put everything in (the one that's linked to the button)
I hope that helps! Tell me if I should be clearer (Sometimes things make sense in my head but not on paper, as it were... :S apologies in advance)