Need some help with Set Actor Transform

Quite.

If you get it working with the SG, you don’t need to use GI at all. ( maybe for other things ).

Yeh, for sure.

Like I just noticed, I was strictly only using the SG when loading info for the player’s transform location. Though I am using game instance for character to be loaded, it makes me wonder, why am I even doing it this way?

It could just be that it’s 6am and my brain is tired and going in circles, but I’d rather not use the GI at all for things I don’t need to.

Edit: Oh, right, I remember now why I was using GI for the character. Because the character can be set by the character select, or by the load, and I fill in that data depending on if I’m going through new game or through load game. So that’s fine the way that is.

It could be the 6AM - itis

Two classic SG problems people have are

  1. Creating it every time they use it ( which empties it out )

  2. Not reading it before changing it, and writing it back.

Hope you find it :slight_smile:

yeh at least I’m not doing those two things. lol

  1. I’ve created it just the once only if there is no save already.

  2. I’ve loaded it’s info up (reading it) and then changing the info and then writing it back, like you said.

Looking over my code a second time, I remember now why I used the GI for certain things. Like the character to be loaded, it’s set to the saved character any time you load the game, so it makes sense to have that set up that way because normally (without loading) you would set the character to be loaded by clicking one in the character select screen. Given I didn’t want to have to differentiate loading one character value or another depending on how you reached that point, the GI made sense for it.

But I didn’t need the GI for things like the character transform, because that is only ever set to the default position initially upon loading the level. saved transform’s value is set every time you save, so the two variables never really affect each other. So when it came time to load game, I only needed to get the stored value in Saved Transform.

As for why the Bool didn’t work the same way? I’m not sure. Theoretically, it should have worked fine. It’s only ever set to false if you go main menu > new game > click a character in the level character select. that world object is never even reached in code if you go straight from main menu to load game. so once the game is saved, that shouldn’t have been an issue.

One more thing. I see in this sequence

You’re setting the bool, but not writing the save game.

When that open level node kicks in the bool will be false…

Sorry to confuse you, that screenshot is the Load Game code.

The Save Game code has the Save Game to Slot node (in both the part where I create it and the part where I save over existing).

1 Like

My bad…

No no, it’s okay! I realized after I took the photos that it’s hard to tell what sections of code each one is since the name/description of the Comment section is off-screen.

Again thank you so much for all your help! Whether someone provides the solution or we figure it out on our own, it’s still helpful to have someone as a sounding board to help bounce thoughts off of. Sometimes just telling someone about my issue I’ve run into leads me to realize the solution while I’m telling them about it. :stuck_out_tongue:

There was this one issue I had where I wanted to have music that plays an intro, and after the intro ends play a looping chorus, and at a certain point in the game have it switch to an outro, and I was thinking I had to make the outro the same as the looping chorus but have the ending part tacked on, and was thinking I needed to be able to know at what POINT in the loop it was currently at to switch to that same point in the wave file for the outro to pay without any skipping or issues. It wasn’t until I was typing up a question to ask for help that I realized “wait, I don’t need to do that. I can just turn off looping on the chorus, and then when chorus finishes playing, play the outro.” It was a sort of “duh!” moment that took talking to someone about it to realize.