Can you turn a name array into a string array?


I’m trying to make a function to turn a name array into a string array, but I fear as if it’s impossible. I want this function to output a string array.

The type of Tags (a local?) appear to be Name array, you are converting to string then back to name (hence the two · conversion nodes).

Change the type of Tags, you will need to delete and re-add the ADD node off it after, and remove the second conversion of course).


I have this issue when I try to do so, is there no way to turn array of names into strings, I know you can turn an array of strings into names. according to this answer.

Tags is still the lighter pink there, so its type is still array of Names.

Select it in Locals (I’m a assuming it is a local) and change the type there:
image
or over on the details panel if you need to change to array (which you shouldn’t, it’s an array already, just of the wrong things).

It isn’t local. It’s coming from my BP_Sign in which I assigned a tag to it.

I’m trying to make it to where you click the sign that it will transport you to another level. Here’s what I have, but I’m having trouble retaining the “Sterilization Room 2” tag.

The sign’s are also made out of a button UI, but I haven’t had any luck there.

Oh, just make the string you are comparing a name then, and compare names.

image


I’m sorry, where would I place the “make literal name”, it isn’t in the format of an array. Also, when i ‘GET’ tags, it doesn’t retain the variable “Sterilization Room 2” even though that what the tag is on the sign in the level.

My turn to be sorry :wink: I’m confused, what exactly are you trying to achive here, what is the tags array, and what exactly do you want to do when the widget is clicked?


So the tag here replaces the text on this widget to say “Sterilization Room 2”. I want to be able to click this button widget and transport the player to a new level. But I need to check if the tag corresponds with the level name “Sterilization Room” because I have many different signs and levels.

For instance, I have three signs: “Sterilization Room 1, 2, 3” that will all go to the “Sterilization Room” level

Here is my button widget

Could you perhaps just put the level name in as a second tag, and then use Load Level Instance (By Name).

This should help your initial question.

Other than that, you can always open a level by name instead:

…but I’m not really sure how both of those fit together.
Also, please try to compare Names and not Strings if you have to. It’s much faster.


This is what I believe @silnarm meant. Also any reason you are using a reference to self to get tags?
image
It’s not bad per say, just unnecessary.

@dZh0 answer to your original question also works.