Download

Is there anything like the Python List in UE4?

Basically I’m trying to make my own simple inventory system and I have a Struct in which I have different item actors

and What I’m trying to do is, if the actor comes across the item in the world, when its sphere collision overlaps actor and the overlap event is fired, I want it to search the struct for a matching actor variable and set the overlapped actor to it. Then destroy the actor in the world.

Only problem is, I can’t find a way to search the struct so I was wondering if I could make a list of all the struct items first. I can’t use arrays since they only work for one type of object.

Halp pls

Take a look at the dictionary type, also called map:

Thank you! I can work with this :slight_smile:

1 Like