How to cast multiple variables at once to another game level?

Hello,
can i create maybe a array of variables and cast them to another game level?

This might look good with one variable but what when i want to cast multiple variables? Like Energy, Shield, Health, Stamina etc?

I suggest you put the variables into a struct and then you can use the same set-up as the tutorial. To make it even cleaner and more efficient have a function do the “setting” before level transitions and then a separate function for the “get” and “set” of the player variables from the game instance.

I guess what I am trying to say is I don’t know of any way to automate that process because somewhere along the line you have to tell the computer exactly what you want to save which necessitates you somehow manually collecting your variables to save. My comment about using a struct was a way to take 10 variables and instead of using 10 get and set nodes you only do it once for a struct that contains all 10 variables. However somewhere along the line you would still need to break the struct down into it’s individual variables for use during gameplay and for that you would still end up having to get or set each of the 10 individual variables contained within the struct. The struct would just simplify the steps required to save the data at the end.

Not sure what you mean, i know what functions are etc. I want to know if i can do it all at once like using an array instead of doing get/set for each variable.

I’m doing it like this (sorry for late post)
Set Instance Function

Get Instance Function

If you post it i can give you a “Checkmark” because i want to have all solved questions :stuck_out_tongue:

So what I was saying about a struct was this,

have one “struct” that contains those 4 float variables, so for this function all you would need to do is get and set one struct variable and everything would be fine.

I didn’t use struct. Is this that “structure blueprint” ?

Yes, you need to create the blueprint class for the struct variable. In the content browser right click, look for the blueprints tab, at the bottom of that tab should be “struct” you need one of those