Set value of a struct-member

Hello,

I’ve been struggling quite a bit to figure this out, but I just can’t… Therefore, I’m wondering if this is even possible, but first let me explain my situation:

The struct I’m using contains an enum and an integer. What I need to do is to change the integer-value of the struct at runtime in blueprints. Is this even possible? If so, how to I accomplish this?

Thanks in advance :slight_smile:

~Stefan

1 Like

This is definitely possible.
You can indeed use the Set members node to set whichever variables you want by providing the structure. If you drag off the structure and search “set member” the node will come up.

2 Likes

I managed to solve my issue, thanks alot :slight_smile:

Consider setting the question as answered to help anyone else struggling.

Oh man. This whole time I’ve been copying the whole struct, creating a new one, changing all the values (or copying the ones I don’t change from the old copy) and assigning it to the same variable or array slot.

I’m aware this is an old question, but at first it didn’t clarify the issue for me, so I thought I’d add some more specific info about how to do this, because it might help others like me.

You need to select the “set members…” node, and then choose the pins you’d like to access in the details panel:

In the same way, you can also hide all the nodes that are not connected on large structs, and make your blueprints much easier to read:

12 Likes

Just a thankyou for filling in the details. Much appreciated.