So I’m working on containers in my game. Specifically, a box that holds stuff.
So here’s my system so far. The container has an array of structs, called “ContainerItemStruct”. This is has two values: “Item” (Which is a blueprint) and “Amount”.
Huzzah. This works well!
HOWEVER… This is very limited. What if I want to add a sword of damage 12, or a pizza with defense 4? Basically, I want to add more struct vars… but only when the item needs those vars. Armor will have a defense var, but a sword will have damage, and so on.
So… any ideas? I’m thinking having the ability to select a category and that will provide a different struct depending on whether the category is “weapon” or “armor”, but I’m not quite sure how to do that.