Sign in to follow this  
Mario384

Custom Character's Head Bugged When Wearing Hats

Recommended Posts

Mario384    1082

Okay, basically, I have a custom character, and everything works fine animation-wise, until I wear a hat, and then the face goes to the far bottom-right.  How can I fix this?

Share this post


Link to post
Share on other sites
Mario384    1082
46 minutes ago, RyanandLink said:

Check if your headbase_hat files are the right resolutions (I think it should be the same as all the headbase files). Does it also do this in Spriter?

No, it doesn't.  However, I just fixed it using a custom work-around, so I have solved the issue.

 

local function Equip(inst)
    local head = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD)
    if head then

    inst.AnimState:Show("HEAD")
    inst.AnimState:Hide("HEAD_HAT")
        
    end
    
    if not head then

    inst.AnimState:Hide("HAT_HAIR")
        
    end
    
end

 

inst:ListenForEvent("equip", Equip)

Share this post


Link to post
Share on other sites

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
Sign in to follow this