I have an issue with my code where I use a switch to int. to update my icon image when an Item is picked up. What I wanted my code to do is basically after I pick an Item up a new icon will fill in the next slot next to it, but for some reason it won’t do that it will just swap out the icon that is in the first slot. Any help?
Are you passing in the correct struct to add? At the start of your event you are passing in a struct that is unused. Does this carry the picked up item information in it?
Could it be that you are constantly passing in an internal variable instead of the new information?
Have you tried printing out the returned index? Is is constantly the same? Does the array actually grow on item collection?
Put a breakpoint F9 on the collect event and step through the code seeing what parameters are failing (hover over pins once the code goes through them to see values).