Combine 2 array elements into one array element

hi,

see pictures below the arrays are shown and their details .

i want to create an array of string type Called “NumLetts” and populate it with string elements : a1,b1,c1,d1…a2,b2,c2,d2 …a8,b8,c8…h8 . …

…populating them all by hand would be tedious , so what’s the best way to go about automating the process ,??

i thought maybe creating 2 separate arrays one being of integer type called “Numbers” ,the other being string type called “Letters” , and populate the first with the integers 0,1,2…6,7,8 then populate the second one with strings a,b,c,d…g,h .

the next step would be to criss-cross combining each element from the 2 arrays into a new array of strings which is array “NumLetts” forming elements like a1,b1 …g7…h8 . .and so ( how to do this i don’t know i mean combining 2 elements of 2 arrays into 1 element in a new array .)

Thank you .

hi,
Ohhhh…you are a genius , i can’t thank you enough or give you back anything for this , you saved my life , i appreciated .

Though now the real issue for me or let’s say a confusion rather( idon’t know if it’s even possible at all) :

when you get this array is stored in a variable “Num Letter Array” and you can reuse it as long as the button g is pressed , the point is you need the flow of events to make up the storage of this array .

Let’s put it this way when you create a new array variable in the " Myblueprint" left side panel and populate it with elements ,initialize it, i should say, then it will be this every time you get it inside the graph it does not require something to fire it off …

…and that’s what i want , to turn the result of the automation you did into an array variable that behaves like a new one created so i can put it wherever i need without worrying about firing events to make it up again .

I came up with same results after a tedious approach and it is stored as yours in this array called “Final Store” see picture below , but only at run time i get the array populated , when i get out of play the array is empty .

Here you go. The automated version of the process. All you have to do is type “abcdefghijklmnopqrstuvwxyz” into the “Alphabet” variable and the computer will take care of the rest.

1 Like

I honestly have no clue what you are trying to do now. What I created for you is a way to automate making a “string” of variables that goes “a1,b1,c1…a2,b2,c2…etc” You can have that go as high as you would like depending on the “number” you increment up to and when you decide to cut it off. My basic set-up which is just showing you HOW to do something like this, it is by no means specific for your particular situation is just every click of the “G” key will add an entire alphabet string with the next incremented number. So hitting “G” twice will create an array from a1 through z2. This is entirely created in a blueprint so once you close the game, turn off the computer etc, exit the “play in editor” all the data goes away. It can be re-created at runtime the next time you hit G. You can have this automatically create an array at runtime without having to hit G, by using “event begin play” or some other event that doesn’t require user input to fire this off. None of those options however will give you an “array” of data that you can use wherever you like once you close the editor. If you want an actual “array” of data saved that you can pull back out the next time you play the game like a high score you want to keep track of you are getting into save/load game data issues. You can definitely “save” the array you created to the hard drive and access it during another play using “save game to slot” and “load game from slot”. But all of that will take a bunch more blueprinting to set-up. Again, very confusing post you just made but hopefully this answers something for you.

1 Like

Also you don’t need to “press G” to use the array once it is created. Just drag the “array variable” created from the “G” button press out into the event graph and use it wherever you like in that blueprint. All the data is there, holding down G does nothing. Pressing G creates an additional string of data and adds it to the array. So you can use the array once you hit G the first time and it will have a list of strings from a1-z1. And by “use the array” I mean set up logic for it based on what you would want to do when the array is populated. There is absolutely no way to “populate the array” by automation and use it without running the code ie. “play in editor”. If that is what you want then you absolutely have to manually enter the data. You can’t ask for something to generate automated data if you don’t turn on the automation which would be “playing” the game.

…Yeah absolutely your latest comment sums it up that’s what i was trying to do quote: “populate the array” by automation and use it without running the code " ,

it was dumb from me to think that i can store the result from the temporary automated array to a static initialized array that i can just get into the graph and find it populated as if it was by hand .

Thank you for you clarifications helping me wipe out the confusion about temporary variables.

i was planning to post these pictures for you to understand what i was trying to do but after your latest post there is no need for them :

Hi,

One last thing how to tie this array alphanumeric to mesh pieces so i can reference them by a1.a2…h8.
See this Posted Question instead : Numeric index to AlphaNumeric index - Programming & Scripting - Epic Developer Community Forums .

So i moved from this post to a new posted question to keep things tighter .