On my journey of trying to get used to Array which I always ran away from... thanks to — I could finally add a basic working Array to my game.
Based on the GIF, as you can see the idea is whenever the PLAYER touch that cube-sprite on the left, it will add (push to the Array list) a NEW ITEM to the game which is what I want for my game: something to TRIGGER a NEW ITEM FOUND!
and add it for the game (even if you quit it, I will learn and use how to SAVE later).
I used the CHOOSE and put 2 "NEW" items like this: (Items that are not found yet by the player)
Debug: EVERYTHING Works great, as soon as the player collide with that sprite it's destroyed and one of the two NEW Items will be added to the Array "Arr_Items" list.
But THE PROBLEM is: next time when I want to add different ITEMS, it may still choose one of the ITEMS that already added.
MY GOAL: Once a NEW ITEM is added to the Array list, I want NO MORE of this item to add in the future
The GIF shows an example of what will happen if the PLAYER will FIND A NEW ITEM during a full game.
I'm aware that the problem is CHOOSE because the names are there to choose from and I can't remove them once chosen... or maybe I can? (it will solve the issue)
So is there a way to make sure, once an Item added to the list it won't be added again?
so I won't get huge list with the same Items.
Have a look:
Please understand, not only I'm new to Construct 3 but also ARRAYS are new to me and I'm trying my best to learn and understand how it works in C3 while practicing. so far I'm VERY impressed from the powers of Arrays!