Jump to content

Making my character wear a Hat during Character Selection


Recommended Posts

AddClassPostConstruct("widgets/redux/loadoutselect", function(self)
if self.puppet == nil or self.currentcharacter ~= "yourcharacter" then
    return
end
local puppet = self.puppet 
--don't mind me 

        puppet.animstate:OverrideSymbol("swap_hat", "your_hat_stuff", "swap_hat")
        puppet.animstate:Show("HAT")
        puppet.animstate:Show("HAIR_HAT")
        puppet.animstate:Hide("HAIR_NOHAT")
        puppet.animstate:Hide("HAIR")
end)

This should be everything, maybe you might need to include your anim assets for the hat but ya. 

Edited by thomas4846
code fixed
Link to comment
Share on other sites

13 hours ago, thomas4846 said:

AddClassPostConstruct("widgets/redux/loadoutselect", function(self)
if self.puppet == nil or self.currentcharacter ~= "yourcharacter" then
    return
end
local puppet = self.puppet 
--don't mind me 

        puppet.animstate:OverrideSymbol("swap_hat", "your_hat_stuff", "swap_hat")
        puppet.animstate:Show("HAT")
        puppet.animstate:Show("HAIR_HAT")
        puppet.animstate:Hide("HAIR_NOHAT")
        puppet.animstate:Hide("HAIR")
end)

This should be everything, maybe you might need to include your anim assets for the hat but ya. 

besides the "yourcharacter" and "your_hat_stuff_", is there something else I'm supposed to change? I threw this into modmain with the changes to work with my own character and hat, but it doesn't seem to show up at all still.

Link to comment
Share on other sites

On 2/8/2021 at 12:42 AM, thomas4846 said:

image.thumb.png.8d01dedba46ca162fd6e3a249727efa6.png

Oh, I see the confusion here. When I meant character selection, I meant the icon part on the screen before, not the clothes selection part! Although, that is also a good idea!

I meant I wanted it to be here image.png.bfac2624b78fbd978a6a70ebe9799d6b.png

Also, which widget does this screen use out of curiosity? I can't figure it out on my own.

Link to comment
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
 Share

×
×
  • Create New...