How to get variable by name?

Hello. I’m trying to connect my enum with character’s parameters like strength, agility, etc.
I’ve created enum:
image
and trying to connect it to variables from my gameinstance:
image
in function:


The problem is I don’t have that function. The only way I know is to create that:

but I have TOO MUCH parameters to do it.

I’m using blueprints only, tried to watch that video:

but author is using c++ to create user library and to use it in blueprint.
Can you help me?

Use a Map variable instead with the Enum as the Key and int32 as the Value.

image

image

image

Then you can use the Find and Add nodes to get and set the values.
image
Add node adds the enum to the map if it doesn’t already have it. If it already has it, it’ll just replace the value.

1 Like

Oh, very interesting solution, thank you! I’ll try this.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.