Hello! I’m working on a project where I’m spawning multiples of the same object based on a position file loaded as a data table. In this data table, I’ve also added a column that adds a tag to each object version. I’m hoping to later use these tags to perform certain operations in a blueprint for some objects but not others. However, I’m unable to get UE4 to recognize these “tags” as actual object tags. Does anyone have any BP scripting guidance or advice? I’m still a beginner, so anything would be appreciated!
Are you talking about Component Tags or Gameplay Tags?
I’m unable to get UE4 to recognize
these “tags” as actual object tags
Tag is a name variable. You should be able to Set or Add tags like so:
Using a “Get Data Table Row” node, you can get the needed data struct from your Data Table. I guess you already made that struct, and that the one of the membets of that struct are the tags you want for your object. You can add a “break struct” node of the correct struct type to the “Out Row” output of that node.
One of the things in that break node will be your tags - ideally it should be an array of Name-type variables. Any other type, like a string of comma-separated tages, you will first need to process to turn into an array of names.
You can then take that array of names from the break node, and connect it to an “append array” node. The target array should be the tags of the object you created, and the source array should be that array of names you get in the “break struct” node.
Should look something like this.