Topic was automatically imported from the old Question2Answer platform.
Asked By
Hexelon
Hello, i have an array of custom resources called “Items”. And i have several “items”. I need a way to stack them depends of they type and add them to inventory. How can i compare they type and add them to this array using GDScript?
Would a dictionary of arrays help? Make the dictonary keys the names of the types and the values the arrays of items of the corresponding type.
To put this in pseudo-code: