How are you managing data?

Let’s suppose you start a mission in your game, and at the end of the mission you will want to display various data about how the player did.

Some of that data you can get right at the beginning the of the mission (i.e. the missions name).

Some data you get during the mission (enemies killed tally)

Some data you will need to calculate after the mission is over (time elapsed/time limit).

It makes sense to store data like this in a struct, but I find that a little unwieldy because when you use the “make struct” node, you have to be careful about overwriting member variables. This makes the process error prone.

I suppose I could make a save object that way I can just access member variables individually to update them when appropriate? And then I don’t have to worry about accidentally overwriting anything. But is it a little strange to use the save game object for non-save game related operations?

I’m curious to know how others might be handling similar scenarios. TIA for any input.

1 Like

Actually this effectively solves the problem I was having with structs:

Unreal Engine 4 Good to Know - Set Members of Struct - YouTube

2 Likes

The real fun bit starts when you have layers of nesting arrays of structs inside other arrays of structs. But, yeah Set Members in Struct is the way to go!

2 Likes