Array of structs element not updating

I’m making a simple objectives system that when you complete an objective the objective will be completed (in the array). As you can see below, I have one big struct that keeps Quest details in it, then broken down into other structs further down to get what the objective is. This all works, the only problem I’m having is with setting the struct again.

The objective set is basically what keeps a lot of objectives so one quest can have multiple parts.

I hope this image and details helps,
DETERMINATOR20

As Moe Wattar said, read on for more info.

You Set Array Element for the Objective Set - this should work fine. You never set the data for the Quest Data, though.

Unfortunately, when you Get something from a struct array, you get a Copy of the data (unless it’s an AActor) rather than a reference - hence the need for Set Array Element. You can try right clicking the first Get and convert it to a reference get but I bet it is still not working (perhaps it’s fixed in 4.22 - haven’t checked).


If the above does not work, a fail-proof method is to Set Members in Struct + Set Array Element combo for the first array as well. While this may seem cumbersome, it should work fine.

You’re setting the updated objective in the objectives set array but not updating the objectives set array inside the Quest Data array, i hope that made sense. May i suggest using a Get by ref instead of by copy?

Thank you to both of you! It works!