Do you like inventories? Oh, I know you do. Because everybody does. It's a shame though that in the last few years, probably in a misguided attempt to make RPGs more accessible to console players, many games feature bothersome lists of objects you have to endlessly scroll through to find the desired item. Better take a look at the awesome inventory from Deus Ex:
My absolutely favorite kind of inventory: a grid of cells, with bigger objects eventually taking up more space than just one cell. It just feels right to me. Now you might not share my preference on this, but let me roll a bit with it as I try to talk briefly about including such a feature in a Construct project.
Obviously when you think of a grid of cells, you might as well think of an array. The above picture represents an array of 5 x 6 cells. To make this perfectly clear take a look at the following image:
Think of the array object as the logical construct behind your actual visible inventory the player will interact with. You could create your inventory grid by means of a tiled background sprite and resizing it according to the inventory size.
This event example uses a cell size of 32, simply multiplied by the X and Y dimensions of the array result in a properly sized grid. In case the image of your tiled background object is an actual grid cell, of course.
When you think further the array has a 'For each element'-condition, which loops through every cell. This is perfect to automatically place items in the inventory. You could simply check for an overlap to test if the current cell is already occupied. And keep placing the item within the loop until it doesn't overlap.
I already posted a cap example of this basic but yet effective functionality on the official scirra forums a while ago (link). In the meantime I made an improved version of this, with stackable items, better drag and drop and worked out some minor quirks. With no game project to actually use it in, the thing kind of rests dormant on my hard drive.
Just recently my mind feels overwhelmed by a little inventory madness again, creating one by the means of more advanced methods and plugins. To set myself a bit at ease I had to write this blog article up, which mainly goes along as a little explanatory text to my original example.
In case you expected this to be an indepth inventory tutorial I do apologize. Hopefully this will still prove worth reading to some Construct users, especially those who struggle to make any constructive use of the array object.