Jump to content

Recommended Posts

Buildable as well, if possible. I found this:

local function onequip_green(inst, owner)     owner.AnimState:OverrideSymbol("swap_body", "torso_amulets", "greenamulet")    owner.components.builder.ingredientmod = TUNING.GREENAMULET_INGREDIENTMOD    inst.onitembuild = function()        inst.components.finiteuses:Use(1)    end    inst:ListenForEvent("consumeingredients", inst.onitembuild, owner)end

and the "consumeingredients" seems to be close to what I need, but it's not quite because my mod would need to reference the prefab being built.

@Fireandthethud I think it's like this, need to confirm though.

local function myfunc(inst, data)    item = data.item    recipe = data.recipeend

also the ListenForEvent function is a child of an entity, not a global function.

Edited by Blueberrys

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...