Second inventory and ScopeInventory()
ShadowsEdge19
09 Sept 2017, 15:24If you are using the Second Inventory pane how does ScopeInventory() work with this and not still pick up the items from the main Inventory pane? Is there a way to select a specific inventory?
The Pixie
09 Sept 2017, 17:32The second inventory pane is entirely independent of anything else. You have to tell it what to show, and you have to make sure you update it any time it changes.
ShadowsEdge19
09 Sept 2017, 19:17So how would you be able to check if the list contains nothing/is empty for example?

K.V.
09 Sept 2017, 19:32This is how I check my object to display or hide the extra pane, depending on whether it contains anything:
kv_object.hascontents= false
kv_object.contents = GetDirectChildren(kv_object)
// msg ("kv_object.contents:")
// msg (kv_object.contents)
if (ListCount(kv_object.contents) > 0) {
kv_object.hascontents = true
}
if (not kv_object.hascontents {
JS.uiHide ("#Inventory2Label")
JS.uiHide ("#Inventory2Wrapper")
}
else {
JS.uiShow ("#Inventory2Label")
JS.uiShow ("#Inventory2Wrapper")
}