# Inventory extension

**URL:** <https://forum.makecode.com/t/inventory-extension/8662>\
**Category:** Show & Tell\
**Tags:** extension\
**Created:** [June 9, 2021, 11:29pm UTC](https://forum.makecode.com/t/inventory-extension/8662 "2021-06-09T23:29:04Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![frank\_schmidt](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@frank\_schmidt](https://forum.makecode.com/u/frank_schmidt)\
**Post date:** [June 14, 2021, 10:24pm UTC](https://forum.makecode.com/t/inventory-extension/8662/21 "2021-06-14T22:24:09Z")

</div>

Tried to “share” this Arcade program showing the Inventory values but, for the first time, Arcade will not share a program which has no errors. I went into Menu mode to show the numerical values of each item and then attempted to publish but got the below fail to publish message. In fact my computer is online and I got 3 such messages on 3 attempts, any one have any idea why ?

 ![arcade error one](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/0/0f84968ba0ad691b582f2d7929c20a7e1b9cedc6.jpeg)  
 ![arcade error two](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c71b8247ab3e70b6b35f3528f98657d3d51a7b60.jpeg)

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [June 14, 2021, 10:40pm UTC](https://forum.makecode.com/t/inventory-extension/8662/22 "2021-06-14T22:40:09Z")

</div>

> [@frank\_schmidt](#):
>
> Thanks but is there a way to erase the numerical values associated to each food item ?

Just set the tooltips to an empty string.

> [@frank\_schmidt](#):
>
> associated to each food item ? The program seems to save those values even after closing out the project.

Hmmmm it should’nt…

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [June 18, 2021, 10:08pm UTC](https://forum.makecode.com/t/inventory-extension/8662/23 "2021-06-18T22:08:54Z")

</div>

help, im using it for making a game and i made it so that it selects the first item in the inventory when the a button is pressed, but it does not work for some reason,

here the link to the game (what i have done lol)

> **[help me](https://arcade.makecode.com/68619-91072-59425-62023)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

to open the inventory is menu button

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [June 18, 2021, 10:57pm UTC](https://forum.makecode.com/t/inventory-extension/8662/24 "2021-06-18T22:57:48Z")

</div>

Hopefully something like this will work:

> **[help me fixed hopefully](https://arcade.makecode.com/93858-93917-93806-12562)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

So basically all I did was rebind the jump functions to the up key and then just do the “use” stuff in the A button handler.

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [June 18, 2021, 11:08pm UTC](https://forum.makecode.com/t/inventory-extension/8662/25 "2021-06-18T23:08:41Z")

</div>

oh ok thx

omg dis got instant

---

<div class="post-metadata">

**Author:** ![LaserFoxPro](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/laserfoxpro/32/4105_2.png) [@LaserFoxPro](https://forum.makecode.com/u/LaserFoxPro)\
**Post date:** [June 28, 2021, 9:52pm UTC](https://forum.makecode.com/t/inventory-extension/8662/26 "2021-06-28T21:52:22Z")

</div>

btw, that wasnt the problem,the problem was that when i pressed A the selected slot disapeared and didnt reapear in the inventory, (not hotbar lol) so, it didnt help, sadly

---

<div class="post-metadata">

**Author:** ![Mario](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mario/32/5264_2.png) [@Mario](https://forum.makecode.com/u/Mario)\
**Post date:** [December 22, 2021, 1:02am UTC](https://forum.makecode.com/t/inventory-extension/8662/27 "2021-12-22T01:02:37Z")

</div>

can you post the latest version pls

---

<div class="post-metadata">

**Author:** ![SoftTalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/softtalker/32/10776_2.png) [@SoftTalker](https://forum.makecode.com/u/SoftTalker)\
**Post date:** [December 22, 2021, 6:03pm UTC](https://forum.makecode.com/t/inventory-extension/8662/28 "2021-12-22T18:03:50Z")

</div>

> **[Inventory code](https://arcade.makecode.com/95076-73123-33363-49547)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

this is just the code

---

<div class="post-metadata">

**Author:** ![malandracat](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@malandracat](https://forum.makecode.com/u/malandracat)\
**Post date:** [December 28, 2021, 7:32pm UTC](https://forum.makecode.com/t/inventory-extension/8662/29 "2021-12-28T19:32:51Z")

</div>

can you please add a function for adding an item to the inventory that would be usefull please and also a “change selected index” to go with the set selected index.altogether great extension

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [December 28, 2021, 9:32pm UTC](https://forum.makecode.com/t/inventory-extension/8662/30 "2021-12-28T21:32:48Z")

</div>

For adding items, look in the example I posted.

And issue for change index:

> <https://github.com/UnsignedArduino/Inventory/issues/2>
>
> Feature request \[here\](https://forum.makecode.com/t/inventory-extension/8662/29?…u=unsignedarduino).

---

<div class="post-metadata">

**Author:** ![DataZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/datazero/32/6206_2.png) [@DataZero](https://forum.makecode.com/u/DataZero)\
**Post date:** [May 31, 2022, 4:31pm UTC](https://forum.makecode.com/t/inventory-extension/8662/31 "2022-05-31T16:31:46Z")

</div>

Is there a way to have the toolbar while in 3D Render Mode?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [May 31, 2022, 9:10pm UTC](https://forum.makecode.com/t/inventory-extension/8662/32 "2022-05-31T21:10:12Z")

</div>

Sorry, I’m not sure as I have not tried using the 3D extension @AqeeAqee made. But if it can draw a sprite on screen like a GUI component, then it should work.

---

<div class="post-metadata">

**Author:** ![DataZero](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/datazero/32/6206_2.png) [@DataZero](https://forum.makecode.com/u/DataZero)\
**Post date:** [June 1, 2022, 5:20pm UTC](https://forum.makecode.com/t/inventory-extension/8662/33 "2022-06-01T17:20:51Z")

</div>

Actually its fine just make any sprite relative to screen and it works just fine.

---

<div class="post-metadata">

**Author:** ![Raed438](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/raed438/32/24469_2.png) [@Raed438](https://forum.makecode.com/u/Raed438)\
**Post date:** [June 8, 2022, 4:21pm UTC](https://forum.makecode.com/t/inventory-extension/8662/34 "2022-06-08T16:21:50Z")

</div>

Hi, Nice To Meet You

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [July 20, 2022, 6:00pm UTC](https://forum.makecode.com/t/inventory-extension/8662/35 "2022-07-20T18:00:07Z")

</div>

I added the blocks to change numbers, so you don’t need super long blocks for it!

I also updated the example: (works slightly better and uses more functions for cleaner code - you can use this for the [Simulation Mini Jam](https://forum.makecode.com/t/announcement-makecode-arcade-mini-game-jam-2-simulation-jam/14492) possibly!)

> **[Inventory example](https://arcade.makecode.com/43819-21618-07441-28796)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 24, 2022, 7:19pm UTC](https://forum.makecode.com/t/inventory-extension/8662/37 "2022-08-24T19:19:06Z")

</div>

Do you happen to be using sprite utils? Just wondering, as I’m unable to reproduce this myself. Can you open the console and look for the “TS” errors?

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 25, 2022, 4:54pm UTC](https://forum.makecode.com/t/inventory-extension/8662/39 "2022-08-25T16:54:09Z")

</div>

Did you have the sprite until extension installed _before_ you installed the inventory extension?

You can delete extensions, but sprite utils is used internally by Inventory. I can probably remove the dependency to it by just duplicating some code though, which I’ll do when I can…

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [August 29, 2022, 4:14pm UTC](https://forum.makecode.com/t/inventory-extension/8662/42 "2022-08-29T16:14:59Z")

</div>

Set the toolbar relative to camera, and set the position of it on screen. Then set the z index to something really high, I forgot what Z index the ray casting extension renders at.

---

<div class="post-metadata">

**Author:** ![UnsignedArduino](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/unsignedarduino/32/592_2.png) [@UnsignedArduino](https://forum.makecode.com/u/UnsignedArduino)\
**Post date:** [September 2, 2022, 9:17pm UTC](https://forum.makecode.com/t/inventory-extension/8662/44 "2022-09-02T21:17:53Z")

</div>

Sprite flag, like how you set your sprite to ghost or invisible.

---

<div class="post-metadata">

**Author:** ![NobodyNomad](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/nobodynomad/32/10821_2.png) [@NobodyNomad](https://forum.makecode.com/u/NobodyNomad)\
**Post date:** [December 29, 2022, 5:40pm UTC](https://forum.makecode.com/t/inventory-extension/8662/45 "2022-12-29T17:40:39Z")

</div>

this seems really complex i just use buttons that change a variable by one when it reaches certain number it loops back and if variable equals \_\_ change item indicator sprites to match \_\_ and if action button is used then do corresponding action with item

my code could be useful, sorry if it isn’t, feel free to use parts of it (with credit given maybe)

> **[PixelPlace 2.0.1](https://arcade.makecode.com/S10128-57137-76177-07753)**
>
> Made with ❤️ in Microsoft MakeCode Arcade.

[Previous page](https://forum.makecode.com/t/inventory-extension/8662.md?page=1)

[Next page](https://forum.makecode.com/t/inventory-extension/8662.md?page=3)
