Inventory extension

The point of this extension is to hide the complexity of drawing an inventory or toolbar! They can be really complicated as a UI component, which is why there are a lot of blocks.

3 Likes

yes you can use the toolbar in 3D(2.5D)

1 Like

you use the auto-destroy block in the sprites section and click on the auto-destroy if you scroll down there’ll be a relative to camera option.

1 Like

I’m working on a multiplayer game (using riknoll’s split-screen extension), and I need players to be able to access their own inventories. Would it be possible to add a block to set the inventory’s dimensions?
Thanks, all your work is amazing!

2 Likes

This doesn’t seem that hard to add in, but I don’t have the time for this :frowning: You can fork my extension and/or submit a PR if you wish!

2 Likes

Alright, that’s okay!

2 Likes

@UnsignedArduino can the Hotbar sprite be scaled smaller

2 Likes

Using the scaling attribute it’ll probably work. Never tried though.

1 Like

It doesn’t look like it works with sprite scaling in sprites or with the scaling extension, if you know any other way I’d appreciate the memo, thanks!

1 Like

image
Seems to work just fine for me. For example, I modified my last example code for this extension to make the toolbar half as big.

1 Like

Thanks I’ve been doing whole numbers, so that makes sense why it wasn’t working

2 Likes

but it’s still not working

1 Like

I forgot to explain my situation I’m trying to use the scaling with the sprite utils on “screen z” block

1 Like

Can you send your code?

I’m unsure why you would need the draw on z index block, as it’s already a sprite. Are you making it relative to camera?

1 Like

I am making a Battle Royal game with the split-screen extension but, if I had the inventory set to camera, which I don’t have, it would show duplicate the inventory four times in the four screens, but it wouldn’t move with the one sprite it was supposed to be attached to. So, I used the on Z-index but it draws the image without being able to scale the drawn image down.

Here’s the game:

there is a lot of code though, so there’s a big mess, sorry.

1 Like

Hmmm…you may need to manually position the toolbar sprites every frame. (so a fake implementation of relative to camera)

Then you can use the scaling attribute to make it smaller.

1 Like

Thank you very much!

2 Likes

Ho do I get an array of all the inventories?

1 Like

Why do you need to do this? Typically you just need to keep it assigned to the player

2 Likes

I tried to change the amount of items you can have in your hot bar to be one and change the amount of items in your inventory to 30 and it stopped working is there a solution to this? https://arcade.makecode.com/S38308-86097-72373-28412

1 Like