Question About adding a beard


Fahakar

Recommended Posts

I'm trying to add a beard to my character but instead of dropping "beardhair" i need it to drop" thulecite" and "nightmarefuel" , i don't get any crashes , but it won't work in-game.

 

 

 

 

local prefabs =
{
"thulecite"
"nightmarefuel",


}

 

--The local  start_inv= { }

 

local fn = function(inst)

    inst:AddComponent("beard")
     inst.components.beard.insulation_factor = TUNING.WEBBER_BEARD_INSULATION_FACTOR
    inst.components.beard.onreset = function()
        inst.AnimState:SetBuild("wodb")
    end
    inst.components.beard.prize = "nightmarefuel"
    
    --tune the beard economy...
    local beard_days = {3, 6, 9}
    local beard_bits = {1, 3, 6}
    
       inst.components.beard:AddCallback(beard_days[1], function()
        inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_short")
        inst.components.beard.bits = beard_bits[1]
    end)
    
    inst.components.beard:AddCallback(beard_days[2], function()
        inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_medium")
        inst.components.beard.bits = beard_bits[2]
    end)
    
    inst.components.beard:AddCallback(beard_days[3], function()
        inst.AnimState:OverrideSymbol("beard", "beard_silk", "beardsilk_long")
        inst.components.beard.bits = beard_bits[3]
    end)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.