I need to create like 6000 variables for a project (not a game but I use UE5 because of the blueprints) and it is really time consuming creating 1 by 1
Obviously you can make arrays as big as you like ( within reason ), so you could read the data table and keep adding indexes to arrays. But I don’t think you can add independently named variables, from a table, with blueprint.
You would probably need to use a plugin, or some CPP.
My first thought was creating an array and set the item integer at every index but I couldn’t do it, and I needed to create variable for every item. Is there a way to make it as I tried first?
Basically I want to do if a criteria is TRUE then add +1 to the item at the certain index
I succeded at locating the index but I couldn’t add +1 when the criteria was true, only making it once and not for every happening, that is why I had to create variable for every item.
I read somewhere that you can just read from the datatable and cannot modify it realtime, also I don’t understand what is this for? Is it reading a whole row and you can add things in it? Can you explain it a little bit please?
Data tables are read only, unless you use C++ or have a plugin.
Because it’s not designed to be used in runtime. It’s input for your system. On begin play, you read the data into structures you can use at runtime. It’s really just an input method.
A DT is just a list of structures
A DT is just a list of structures
I know that but then you misunderstood my question I think.
I created an array like
Index [0] | Item 0
Index [1] | Item 0
Index [2] | Item 0
etc…
Then I set up a blueprint which gives TRUE or FALSE result with a branch node.
If a certain thing is true I want for example the index 1’s item to get a +1 in it’s integer.
That looked something like this:

I could only achieve to identify the index but it didn’t matter how many times I got TRUE result, the item integer only gone up by one because I could only add 1 to 0. I created variables for every 0. Now I have a lot of integer variable and I make it to an array for the items.
Since I need to create some thousand variable by hand, I wonder if there is an easier method.
You’re right, I don’t quite get it ![]()
In your example ( at the beginning ) I assume something’s up with your code that stops 1 getting added when the condition is true. Because at that point you are just manipulating an array, and it’s totally possible to add 1 to elements in an array.
For instance, if I have a random bool as my condition, I can
and I see

Yes, my problem is, it was only counting the +1 once not for every happening
I think it is because of my blueprint, I will try what you posted maxbe I can make it work
No, I still can’t get this to work, it is adding the values to the given indexes only once. It should look something like
Index [0] | Item 0
Index [1] | Item 9
Index [2] | Item 11
etc
It is on an event tick, and the fact not just some index has 1 but almost every single one is the proof it is working, I just don’t understand why it is not adding it more than once
Not a good idea to have something like this on tick.
Anyway, incrementing array elements does work, so it must be your code, sorry ![]()
Yes, I know but since it will not be a game just some blueprints for data, it doesn’t matter in performance ![]()
The problem with the code is, as I mentioned before, the item wants to add 1 to 0, therefore it will always output 1.

It was literally set up like this.
I created the variables for every Item, and I could add +1 as I intended but I need to create a LOT of variable for this.
I cannot implement your idea because for some reason it is not incrementing the Item for the given Index but I don’t understand why, the starto of the BP is the same which was worked with the individual variables.








