Hi, I’m working on some vehicles that have different characteristics (acceleration, suspension, ect), but have the same bp. I can tweak the values in the editor while I’m playing in the editor but when the simulation stops the modified variables are reset to default. Is there a way to save the variables other than manually copy/paste?
maybe create and populate a structure during runtime?
Sorry If I don’t understand the question, but it sounds like you want to utilize the “Create Child Blueprint” Feature. Basically, the MASTER blueprint would be where all the coding is and you’d set all the default values in that blueprint. Then create a child of that blueprint and then set your vehicle type and change all the variables in that blueprint to what you want for that specific vehicle. Then when that blueprint actor is placed in the world it’ll maintain all those variables.
Sorry if i’m not being clear.
I want to press play, adjust my public variables, then press stop, but retain all the values I had adjusted.
It’s easier to find the right values by calibrating the vehicles during runtime.
What I am trying to avoid having to do is: press play, adjust my public variables, then coping them into a notepad, stopping the program, then pasting from the notepad into the variable’s default.
Unfortunately, I don’t believe there is a way to change an actors default variables permanently via runtime. The only way you could do this is create a save game object and save out the variables and then load them every time you start the editor or game. This prevents players from changing your game while playing. Basically, picture it like you have a characters max health set to 500, then the player goes in and overrides this value by changing the default value to a number much greater than 500. Its a preventative measure to ensure fair gameplay. Not to mention, when the game initializes, it creates an Instance of the game (Game Instance Blueprint) that deploys all of your default variables and settings. So if you changed all those settings during runtime its only for that instance of that game, no the actual game itself.