Jump to content

Recommended Posts

After the last post, I'm pretty much done. My character can now switch between 'hood-up' and 'hood-down' forms, and not be able to wear hats while in 'hood-up' (I even added a voice line!).

Though you can still wear both a headgear item and the hood by equipping the headgear item first before pressing the hood up key. What would I need to add to un-equip any headgear currently worn when the key is pressed? 

20190803012803_1.jpg

20190803012806_1.jpg

20190803012759_1.jpg

Well, I don't know, but I looked into the game code, and this should work.

local player = GetPlayer()
local headitem = player.components.inventory:GetEquippedItem(EQUIPSLOTS.HEAD)
if headitem then
	player.components.inventory:Unequip(EQUIPSLOTS.HEAD)
end

 

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