Second Inventory?

berb
03 Apr 2023, 23:22

I want to have two inventories. One normal one, then another for magic-stuff. Anyways, I have no idea how to do that, but I've seen it done. Anyone know how to do that?


Pertex
04 Apr 2023, 12:39

just use the search!
https://github.com/ThePix/quest/wiki/Library:-Second-inventory


Ip Man
10 May 2023, 03:26

Pixie's libraries and documentation are my favs so far!

new to quest, and loving it.


Ip Man
13 May 2023, 23:32

I'm having an issue with second inventory... well really 3rd inventory..

I took the 2nd inventory library and changed all appropriate verbiage to "inventory3" etc, instead of "inventory2."

Anyway, everything seems to work fine with objects already in the inventory "room" at the start of game. But taking any object or adding another object to 3rd inventory makes the 3rd inventory pane go blank.

Am I missing an important script in the setup?

What's causing it?


Ip Man
14 May 2023, 01:27

YES! I figured it out.

I had missed some lines where it was written "secondinventory". Had only been looking for instances of "inv2"

All better. So you can use the 2nd inventory pane to create 3rd, etc. inventory panes.


Doctor Agon
14 May 2023, 19:04

I was just going to ask if you could make a 3rd, 4th, etc inventory pane. so thanks Ip Man.

Further Question.
On the game object, interface tab. You can check a box for an alternative pane order, but the second inventory pane still appears at the top. Is there a way to move this around also, to have it displayed further down the screen.


mrangel
14 May 2023, 21:27

On the game object, interface tab. You can check a box for an alternative pane order, but the second inventory pane still appears at the top. Is there a way to move this around also, to have it displayed further down the screen.

Either by changing which element it is inserted before in the script; or if you'd rather not modify the JS file you could just add something like:

JS.eval("$('#Inventory2Holder').insertAfter('#inventoryAccordion');")

to your UI initialisation script