Hi Guys!
So, i started working on my Sidescrolling Adventure Game and so far working with Construct 2 is great, even though i'm still pretty much a Beginner.
The two hardest things for me will be the Inventory System and the Dialogue System. I started working on my Inventory today, looked at a Bunch of Tutorials and then decided to try it in my own way I'm using a Dictionary Object instead of an Array because i basically only need one Dimension of Data anyways and i kinda like the Dictionary.
The picking up works like a Charm, it's the dropping of the Objects that gives me trouble... I honestly am totally confused at the moment so i try to explain what i did so far:
SET UP
I've got three Instances of my Inventory Slot with an Instance Variable from 1 to 3. The other Variable is called ActiveObject and determines, what object is currently displayed in the Slot.
I also have two global Variables. One is called "OverlappingItem" and saves the Animation Name of the object on Screen (not in the Inventory). When my Player overlaps with the Object and presses Space, the Dictionary saves the current Variable as a new Key, or to make it more understandable, the name of the object.
The "Selected Object" Variable, puts the name of the currently highlighted Inventory Item in a Variable, so the system knows, which Item is selected and gonna be dropped.
As i said, i can add all the items in my Inventory without any problems, no matter in what order i pick them up, but i can't for the life of me figure out how to drop them from the inventory without it all going crazy. It seems to delete the key but i'm not sure how i update all the slots in the best way, so it knows where to put which key. It's kinda hard to explain but if you have any questions, let me know!
Any help would be greatly appreciated! Thank you so much!