Jump to content

Hide wearable


Recommended Posts

I'm trying to discover proper command that hides all items, so I could see only weapons and bare skin. :D The problem is that I can't get it to respons to equip and unequip. Can anyone help, please? Or is there a mod which does that? I could only found one for eyebrella.

Link to comment
Share on other sites

prefabs/player_common.lua has these lines:

inst.AnimState:Hide("ARM_carry")
inst.AnimState:Hide("HAT")
inst.AnimState:Hide("HAIR_HAT")
inst.AnimState:Show("HAIR_NOHAT")
inst.AnimState:Show("HAIR")
inst.AnimState:Show("HEAD")
inst.AnimState:Hide("HEAD_HAT")

You'd want to skip "ARM_carry" for weapons.

Edited by Bumber64
Link to comment
Share on other sites

Try this: (Needs to be a mod, I think that a command cann't change a component too easy.)

AddComponentPostInit("equipable", function(self)
    local _onequip = self.onequipfn
    function self:Equip(owner, from_ground)
        _onequip(owner, from_ground)
        if owner:HasTag("player") then
            owner.AnimState:ClearOverrideSymbol("swap_body")
            owner.AnimState:ClearOverrideSymbol("swap_hat")
            owner.AnimState:Hide("HAT")
            owner.AnimState:Hide("HAIR_HAT")
            owner.AnimState:Show("HAIR_NOHAT")
            owner.AnimState:Show("HAIR")
            owner.AnimState:Show("HEAD")
            owner.AnimState:Hide("HEAD_HAT")
        end
    end
end)

Or, if you want a command, but it will have to be executed every time you change equipment:

local player = ThePlayer.AnimState player:ClearOverrideSymbol("swap_body") player:ClearOverrideSymbol("swap_hat") player:Hide("HAT") player:Hide("HAIR_HAT") player:Show("HAIR_NOHAT") player:Show("HAIR") player:Show("HEAD") player:Hide("HEAD_HAT")

Can be run on the client I think.

Edited by Leonidas IV
  • Like 1
Link to comment
Share on other sites

I think you'd also want to do that after revive (if onequip isn't called.)

Edit: Never mind, I don't think there's a situation where you can have equipment after revival. Life amulet is destroyed after revival animation.

Edited by Bumber64
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...