In game variable

Is there any method to create variable in game?
For example, player starts game and event begin play creates new virable with pre-conceived or random variable name.

Hi :slight_smile:

I don’t think you can create member variable during runtime (it’s the same as C++, you can’t modify class during runtime :D). But maybe you are looking for nodes like Make TEMPORARY_VARIABLE_TYPE for example you can create a float in the blueprint using Make Literal Float and do whatever you want with. However, like any scoped variable in C++, it will be destroyed at the end of your current exec line.

Good luck, best regards.

You can, sort of. If you make two arrays, one with the names and one with the value or you make one array with a special tuple class holding both the name and the value you can simply add to that array. This is as close as you can get though.