By embedding games on your website or application you are agreeing to the Construct.net Arcade Terms of Service.
Get it on the Scirra Store: construct.net/en/game-assets/game-templates/advanced-inventory-1020
This is an advanced inventory example similar to Terraria. There are three items, circles, squares, and triangles, though you can easily add more. The inventory can hold one circle, 5 squares, or 10 triangles per slot. When you click an item, it will go to the next empty slot. You can move all items in one slot to another by left clicking or move just one by right clicking the item you want to move. Fully commented. Editable with free edition.
Left click a circle, square, or triangle not in the inventory to add it to the inventory. If the inventory is full this will do nothing. Circles have a max stack of 1, squares have 5, and triangles have 10. Left click an item in the inventory to select the full stack, right click to grab one at a time. If you have an item grabbed, clicking on a slot that is empty or has the same item and is not full will add it to that slot. Clicking on a slot that has a different item will swap the items. Middle clicking while holding an item will delete it.
how this works when i go to next layout, all items are saved?
No. The data is stored in the inventory slots via instance variables. I made this a while back and to be honest it probably would have been better to take an approach using an array for data storage.
its possible to drop on the ground from inventory?
No but if you middle click while holding an item it gets deleted. In a game you could use 'system-> create object' at that event to simulate what you are asking.
Can you Make this available now?
Yes. I just uploaded it to the store and it is waiting for approval. Here is the link: construct.net/en/game-assets/game-templates/advanced-inventory-1020
This arcade game is a preview for following asset for sale in the Asset Store: