Jump to content

Backpack Widgets, Two at once?


Recommended Posts

I have a character with a custom hat that adds 6 slots of inventory, like an icepack. In the prefab file, I have inst.components.container:WidgetSetup("icepack").

If the character has the hat on and a backpack equipped at once, only one can be opened at the same time. Would it be possible to have both open at the same time? I don't have any experience with widgets other than the one line of code I inserted above.

Ideally, when one is equipped it will behave normally, but when both a backpack and the hat bag item is equipped, the backpack's inventory will push upwards (towards the character's health, sanity, etc.) and the hat's inventory will push downward (towards the map controls), so you could easily have access to both inventories at once. 

Thanks for any help!

Edited by Cherryzion
Link to comment
Share on other sites

On 3/26/2017 at 7:20 PM, Cherryzion said:

I have a character with a custom hat that adds 6 slots of inventory, like an icepack. In the prefab file, I have inst.components.container:WidgetSetup("icepack").

If the character has the hat on and a backpack equipped at once, only one can be opened at the same time. Would it be possible to have both open at the same time? I don't have any experience with widgets other than the one line of code I inserted above.

Ideally, when one is equipped it will behave normally, but when both a backpack and the hat bag item is equipped, the backpack's inventory will push upwards (towards the character's health, sanity, etc.) and the hat's inventory will push downward (towards the map controls), so you could easily have access to both inventories at once. 

Thanks for any help!

I'd look at the bundling wrap file to get an idea since it would open it's own separate widget area apart from the backpack/fridge/etc.

Link to comment
Share on other sites

@SuperDavid I figured it out!

When setting up the widget, theres the line "type = " . There are three options from what I've seen in the code, "pack","chest," and "cooker". From what I can tell, only one of these can be open at the same time. So for it to work for me, I changed the type to "custom" (it could be anything other than the other three), and now I can have that widget and a backpack, crockpot AND chest open at the same time!

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