get item from GUI and add it to player inventory

Started by Azure21 on

Topic category: Help with MCreator software

Last seen on 09:19, 24. Jan 2023
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
get item from GUI and add it to player inventory

Hi, Im making a weapon dispenser that generates random loot in slots that you can buy when clicking on a "buy" button.

Actually, I want to get the item (which has also NBTs) from the slot that the player chose to buy and add it to its inventory, however, that doesn't work.

This is how I thought the process:

-> Set Local:weaponBought to: Get item from slot 0 of the currently open GUI of Event/target entity

->Add 1 get Local:weaponBought to Event/target entity inventory