Hello. Texts are added to an array when items are collected in my prototype inventory:
I want to be able to delete them by this text, not by their index. This is because a player will collect items in an arbitrary order. Zero index could be a book, banana, crowbar - anything. I need to be able to target “banana”, for example, specifically, and remove it from the array. Is that possible? I can’t find an action for it and could only find ‘remove variable at index’.
I am also a little fuzzy on what happens when a text is added to an array. Is it like the below, where texts are added to form a list, all being values of the array? Or perhaps these texts count as new children of the array? (they seem to be counted as children when I iterate over them in another event, but the ‘Remove child’ action doesn’t work to remove them).
array = [“banana”, “book”, “cola”, “dino”, “crowbar”]
Many thanks.