The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Combine Callback with Random Integers
AGP Offline
Senior Member

Posts: 448
Threads: 45
Joined: Dec 2012
Reputation: 23
#1
Combine Callback with Random Integers

I'm working on a large combining script that uses items that randomly appear. When I was testing the scripts with the "_1" items, it worked fine, but now that I've implemented the "_2" and "_3" items, the only items that will combine are ones that share the same suffix.

Is there a way to fix this so that any item, no matter the suffix, can be combined with each other? Or is this an impassible bug?

This code is located in the inventory.hps and it does work in some cases. I've checked spellings and such. It only works with matching suffixes.

void OnGameStart()
{
    for(int i = 1; i <= 3; i++)
    {
        AddCombineCallback("VermillionLiquid", "mercury_"+i, "sulfur_"+i, "Liquid", true);
        AddCombineCallback("VermillionLiquidInJar", "paint_"+i, "liquidvermillion", "LiquidInJar", true);
        
        AddCombineCallback("Binder+Solvent", "linseed_"+i, "turpentine_"+i, "PaintA", true);
        AddCombineCallback("Solvent+Pigment", "turpentine_"+i, "refinedvermillion", "PaintB", true);
        AddCombineCallback("Pigment+Binder", "refinedvermillion", "linseed_"+i, "PaintC", true);
        
        AddCombineCallback("BinderSolventM+Pigment", "BinderSolvent", "refinedvermillion", "PaintD", true);
        AddCombineCallback("SolventPigmentM+Binder", "SolventPigment", "linseed_"+i, "PaintE", true);
        AddCombineCallback("PigmentBinderM+Solvent", "PigmentBinder", "turpentine_"+i, "PaintF", true);
    }
}

03-24-2018, 08:16 AM
Find


Messages In This Thread
Combine Callback with Random Integers - by AGP - 03-24-2018, 08:16 AM



Users browsing this thread: 1 Guest(s)