Forum rules - please read before posting.

Inventory Crafting: Help - Two items selected craft/combine by code

Hi! I have two items, but I don't have idea how to use this functions.
I want the result item added to my inventory. I made the craft recipe in the AC Game Editor.
I need a little orientation, please. Thanks in advance!

I have this items:


I dont know how to combine:

AC.Recipe recipe = AC.KickStarter.runtimeInventory.CalculateRecipe();
AC.KickStarter.runtimeInventory.PerformCrafting(recipe, false);


  • I keep trying but I have recipe null :(

    AC.KickStarter.runtimeInventory.CraftingInvCollection.InvItems.Add(_itemSelected); AC.KickStarter.runtimeInventory.CraftingInvCollection.InvItems.Add(_itemSelectedToCombine);
    AC.Recipe recipe = AC.KickStarter.runtimeInventory.CalculateRecipe();

  • Resolved!

    AC.KickStarter.runtimeInventory.CraftingInvCollection.Add(new AC.InvInstance(_itemSelected));
    AC.KickStarter.runtimeInventory.CraftingInvCollection.Add(new AC.InvInstance(_itemSelectedToCombine));
    AC.Recipe recipe = AC.KickStarter.runtimeInventory.CalculateRecipe();

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.