Greetings,
In my game, I previously used global variable checks to see if the player has certain upgrades. This time, I want to rework the system to checking if the item exists in an inventory instead (And show them in an inventory screen). So I got to work on some iterations.
However, I’ve been having unsatisfactory results so far…
(If it helps, all of these iterations are nested under a “Repeat for each Upgrade” block)
MK 2: Function call
Here, the game DOES add the item to the inventory, but it doesn’t display on my inventory screen…
This one is peculiar because I modified this from a previous example I made where this DOES work. Did something break? Or did I set it up wrong?
MK 3: Extract the function call to the events
This is roughly the same as the function call, but modified so that it works outside of it. This one, however, doesn’t work at all. The item is not added to the inventory, nor does it show up on my inventory screen
MK 4: Default inventory example
This is basically a recreation of the default inventory example bundled into GDevelop, retrofitted to fit my game’s mechanics. The results are the same as previously, the item is not recognized as being added, nor does it show up in my menu…
I’ve had the best results with MK 2 so far (The function call), and I’d personally like to fix that one in particular to keep my code small and reusable (If possible ofc).
I’m totally stumped as to why nothing is working. Can anyone see something I missed? I’ll appreciate any help I can get, thanks