Easy way to save non player character informations ?

Hello,
I have in my game several NPCs and I’m trying to save their informations (Like current behavior, state, location, etc…) whenever I save the game. I’m using an array of structures in my game mode to store those informations until I save the game.
However I find this method tedious and I easily get lost trying to send a new information in the game mode…
What I mean by that is everytime I need to update one information in the struct, I have to split it and connect every pin except the one I’m trying to modify.


The structure is also a work in progress and I will want to add more informations to save (Like current health for example or even the type of NPC warrior, healer…), so whenever I add a new information inside the structures, I have to connect that new pin on half a dozen blueprints, or if I change the type of variable (From object reference to Soft ref or integer to float) now I’m having a compiler error on all my blueprints when I update the structure…

I find this method really tedious and it’s easy to break something and get lost trying to find out why the game isn’t loading the proper informations on my NPCs.

Do you know of a better method to save informations in a single place ?

Look into how struct array + Set Members node work together:

1 Like

This is definitely more convenient, as I don’t have to worry about checking all the pins when I modify the structure.
I didn’t know about this so thank you !
Here’s how the same logic looks like now