Scrumch Posted August 3, 2019 Share Posted August 3, 2019 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? Link to comment Share on other sites More sharing options...
zetake Posted August 3, 2019 Share Posted August 3, 2019 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 Link to comment Share on other sites More sharing options...
Scrumch Posted August 4, 2019 Author Share Posted August 4, 2019 I had to add some code to return the worn hat, but aside from that, it did the trick! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.