Hello! I am in the process of creating a action/adventure game in Construct Classic r1.2, and to accompany that i am creating a inventory.
That inventory consists of an array. The objects are read from the array using single values. For example, a key has the value 1 and a sword the value 2. You get the idea.
This works good, but i would like to access the Inventory array easily using functions and function parameters. So far i have managed to create a function that searches for either a free spot, or for an object of the same type and adds the object to the inventory.
The problem is removing objects. What i am attempting to do it Pretty much the same as with adding. I'd like to have a function that checks if the object specified in the function parameter exist in the Inventory. So far my attempts have been successful.
But from there, i'd need that function to fire another function, one that tells what object has been removed, or if it doesnt exist in the inventory (or in the quantity required).
I have not figured out a simple and flexible way to perform this, so now i am turning to the community, and to people with better Construct knowledge than myself.
I have stripped down my game to the bare minimum, although i fear i have removed an important object/event and therefore it is not functional.
But hopefully it will give you a good idea of what i have at the moment and enabling you to give me pointers at what i should do next.
Due to the stripped down .cap file's inability to function properly, i will also be providing you with the full (current version, its far from finished) .cap file for the game i am attempting to create.
Download the stripped-down version here
Download the "full" version here
Thank you :)