Hi in a game I’m working on. Want to hold a table of possible objects I would probably have about 100 of them. Each of these objects would have multiple attributes something like:
Objects name (String)
Price (Integer)
Description (String)
Area Available (String)
Sell price (Integer)
Now if I was storing this in a database I would have a table for objects with a key. I’m not sure how I should do this in UE, I have been looking at array but it feels like a bad fit. There is some integration with a database but I’m not sure about this either.
If anyone could point me the right direction I would appreciate it. I’m using Blueprint I do not know C++.
I would create a variable structure with the variables you mentioned. (Item Data)
if the Inventory items are items that can be actors I would create a parent actor Class. (Containing the created variable Item Data in 1. )
When you have created a parent actor class you can create child actors who already have the variable inherited as well as the behavior of the parent. Then you can store the actors in an array.
else I would probably do it with an array of this structure type (Item Data)
I hope that helps, maybe can you tell why you think that arrays are a bad fit? you could also use the variable type maps where you can search for keys. (Link to Blueprint Maps doc)