What is a good way to process multiple possible string variations into an integer?

That depends

Is there any good way to assign the array elements to the map or do i have to do it manually for each one?

well it depends on what you’re attempting to accomplish. If you know ahead of time which materials/models/names etc that you’re going to need for your Map/Array/Table then you can create a single entity that you can add to with the easiest workflow.

If you wanted to do this dynamically becuase you wanted to keep it abstract, then you’d be looking to loop over a variable number of possible materials/models that you’d retrieve from some function that you’d have to develop separately.

Since we’re interested in using tables we can explore that one, first we’ll want to create a structure, this’ll be where we can associate types of data with one another:

Now we can create a data table:

Now we can use this table anywhere we can access it from and access the information it contains. In the future, when you want to add more variations to the table you can simply hit the add button and include them.

Next you’ll want to make use of 1 or more of 3 nodes:

these nodes allow you to access the names and all the elements along the same DataTableRow that you added earlier. your logic could include iterating through the DataTable at random and choosing a particular set of things for your character to adorn. It could be getting a single element like a material from that row.

If I implement this logic onto a player character that had no skeletal mesh to begin with, it could set both the mesh and the material on that mesh as well as allow me to use it’s name to produce a message:

1 Like