Hello. Please helps!
We are making a recipe.
In the recipe, we execute a function in the onCreate event that adds items item1 and item2.
I need to remove item3.
Does anyone know how to do this?
inv:remove("TestMod.Item3"); - does not work
function recipe_CreateItems(items, result, player)
local inv = player:getInventory();
inv:AddItems("TestMod.Item1",2);
inv:AddItems("TestMod.Item2",3);
inv:remove("TestMod.Item3");
end
recipe Create Two Items
{
Result:item3,
Sound:AddItemInRecipe,
Time:100.0,
Category:Farming,
OnGiveXP:Give10CookingXP,
NeedToBeLearn:true,
OnCreate:recipe_CreateItems,
}
Issue resolved.
You need to add RemoveResultItem:true to the recipe,