wdAMf1517
(wdAMf1517)
September 28, 2023, 8:42am
1
HI! How I can same my actor transform in the savegame file and then load it?
Here is an actor blueprint that get the transform of an actor.
Get transform posted by anonymous | blueprintUE | PasteBin For Unreal Engine
The blueprint works (default value)
I made an interaction button to check if it reacts to rotation change. (It does)
So the rotation is changed and it is stored in the actor blueprint. The problem is how to send the data to the savegame.
This is the Save game and the game instance. (Everything works for the main character (level, pos, transform but not for the object selected in this ‘get transform actor blueprint’).
Save Game:
Game instance blueprint: (Save-game, Load Game, Load Data into game)
Game Instance posted by anonymous | blueprintUE | PasteBin For Unreal Engine
Level blueprint:
Level Blueprint posted by anonymous | blueprintUE | PasteBin For Unreal Engine
What do I do wrong here?
Please help
1 Like
This code is wrong
It makes an array with one element in it.
Also doing this on tick is nuts :). You only need to do it when you save the game.
If you have an array of actors and you want to put that ( and the transforms in the SG ), do this
1 Like
wdAMf1517
(wdAMf1517)
September 28, 2023, 9:25am
3
Thank you for this quick and good answer.
I have another question. - I can migrate the actor transform in gameinstance then take the data in it to savegame and save it and then load it?
1 Like
Yes, you can copy arrays from the game instance to the save game
1 Like
wdAMf1517
(wdAMf1517)
September 28, 2023, 9:30am
5
When my game will release(in a distant future) you will be in the credits (Top Section) <3
1 Like
wdAMf1517
(wdAMf1517)
September 28, 2023, 12:24pm
7
Sometimes I’m an idiot and I cannot make things work. What I still do wrong?
Actor blueprint that is placed in level:
(S1 posted by anonymous | blueprintUE | PasteBin For Unreal Engine )
Save game / Load game / Load Data Into Game
(S/L posted by anonymous | blueprintUE | PasteBin For Unreal Engine )
User widget:
I just don’t know why I can’t get it to work :((((
Cast the thing you just loaded
wdAMf1517
(wdAMf1517)
September 28, 2023, 12:36pm
9
I did this. The save game works but not the storing and loading of the “desired object” transform.
Ok, why are you removing the save game here?
wdAMf1517
(wdAMf1517)
September 28, 2023, 12:47pm
11
I see that it works without deleting the game in slot. :), but still not loading desired object transform.
I’m losing track.
S1 is an actor in the level. It copies stuff into the GI. But where did it get ‘Actori’?
S/L only saves. It does not load.
wdAMf1517
(wdAMf1517)
September 28, 2023, 1:22pm
13
“actori” is an variablle from GI. (where I want to get data from the actor placed in the level and then use it in the savegame and user widget)
But you’re setting it here. Where are you getting this variable from? What is setting IT?
wdAMf1517
(wdAMf1517)
September 28, 2023, 1:34pm
16
Here I get the actor ref.
So you have this actor, it puts the transforms in the GI ( S1 ).
And I see you save this to the save game ( S/L ).
But where is the code for reading it back?
wdAMf1517
(wdAMf1517)
September 28, 2023, 1:48pm
18
Object BP
Game Instance
Master Widget
When I press the “Editable Text Box_1” it should load the information. (I think this is where I am doing wrong. I don’t know how to load it)
I get it, yes. From the widget, we call the GI, which calls the object and it saves everything.
THEN, later, you have to get it all back again, right?
Where is that?
wdAMf1517
(wdAMf1517)
September 28, 2023, 2:02pm
20
I think I don’t know how to get it back :(((
Ok, well that’s why it’s not working then
When you read back from the save game into the game instance, what is supposed to happen?