Jump to content

Recommended Posts

Making a character who survives off almost entirely off his beard and his body/build changes as it progresses based off the Drok characters beard

 

Snippet of it:

 

inst.components.beard.onreset = function()
                if not inst:HasTag("playerghost") then
                        inst.AnimState:SetBuild("bard")
                end
        end
 
        inst.components.beard.prize = "fur_shavings"
        local beard_days = {2,4,6,8}
        local beard_bits = {3,6,9,12}
 
        inst.components.beard:AddCallback(beard_days[1], function()
                if not inst:HasTag("playerghost") then
                        inst.components.beard.bits = beard_bits[1]
                        inst.AnimState:SetBuild("bard_short")
                end
        end)
 
        inst.components.beard:AddCallback(beard_days[2], function()
                if not inst:HasTag("playerghost") then
                        inst.components.beard.bits = beard_bits[2]
                        inst.AnimState:SetBuild("bard_medium")
                end
        end)
 
        inst.components.beard:AddCallback(beard_days[3], function()
                if not inst:HasTag("playerghost") then
                        inst.components.beard.bits = beard_bits[3]
                        inst.AnimState:SetBuild("bard_long")
                end
        end)
 
        inst.components.beard:AddCallback(beard_days[4], function()
                if not inst:HasTag("playerghost") then
                        inst.components.beard.bits = beard_bits[4]
                        inst.AnimState:SetBuild("bard_full")
                end
        end)
 
The problem is my characters build resets to default/naked (But his beard stage stays the same) afther relogging until his beard progresses another stage. How do you save character build/check beard stage periodically and then change build accordingly?

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...