Issue with Backpack item storage/GUI

Started by Blue-Guy on Wed, 09/01/2021 - 03:14

Topic category: Help with MCreator software

Last seen on 03:14, 8. Oct 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Issue with Backpack item storage/GUI
Wed, 09/01/2021 - 03:14

I'm trying to make a backpack that you can open to store items in. You wear it on your back, meaning it's an armor piece. I made it so that forces it onto your back if you try to put it in your inventory otherwise.

I have the GUI working, where if you right click, the GUI pops up. There's two issues though. The first issue is that I was forced to use a "player right clicks with item" global function as armor pieces have no right click procedure, meaning you have to hold an item to open it which I don't want.

The second issue is that the items you store in the backpack don't stay. Once you close the GUI and reopen it, the items will be gone. I tried creating variables for each slot, and making it record the item in each slot with a SlotContentsChange procedure, then making it put those variables in once you open the GUI with a BackpackGUIThisGUIIsOpened procedure, using a "Set 1 [Get global [slot#] for entity Event/target entity] in slot [] of the currently open GUI of Event/target entity" block. This doesn't work for some reason though. I even tested it by putting an already existing item instead of the variable, but nothing gets placed in the slot. Is it because it doesn't realize the event/target entity is the player? Or is there another reason?

I could try making the backpack a normal item with the inventory function enabled, but the issue with this is that I need a separate model that appears on the back of the player that has longer straps than the one you hold, although if I make the item immediately be put on the player's back this might not be an issue. I'm not sure if non-armor items can be put on like that though, and I feel like it'd be easier to just have it as an armor piece if I can.

Last seen on 19:23, 15. Sep 2021
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
hey man, please, send a…
Fri, 09/10/2021 - 19:32

hey man, please, send a photo of where that is, is that I speak Spanish and the name of some things change in my language