the finishing touches
Now create "Function" object. This will help us to control events easier.
Add one function "inv_open" for the algorithm, about which I wrote earlier.
When this function is called, we need to reset old data about our actions.
Now go back to the On object clicked "slot" event and do the same as in the screenshot:
And dont forget to call this function in the startup, to create first objects with which you will be working:
And that's all! You just created basic inventory "engine".
Try to play with it: make inventory bigger, add new items, add some visual effects (drag and drop or something) and so on.
If you liked my tutorial I will not deny myself in making additions to it :)
Also, you can check this inventory efficiency here.
Thank you for attention.
Unlock your full gamedev potential
Upgrade to the Personal Edition of Construct 2, it has way more features and won't holding back from making money and using your full creativity like the free edition does. It's a one off payment and all Construct 2 editor updates are free for life!
Plus, it's got a lot of additional features that will help you save time and make more impressive games!