Variable is Set with Function, But Always Goes on To Use the Default Value

Maximum.Dino
Thu, 06 Mar 2025 13:47:56 +0000
Blueprint

Hello, I’m super confused about why I’m unable to set a variable. For context, this has been happening in multiple situations and I’m thinking I somehow am missing something huge that I should know but don’t. So I’m trying to set a variable in the game mode from a widget blueprint. I get the game mode and cast to them (Which is CFL, a function in my common function library for simplicity). So after it’s called, the variable inside the game mode is set. The debug print string I have tells me it’s been set. But then when just a moment later, another function is called that uses that variable, the variable is always it’s default value of one. I don’t understand this. It sets the variable, so why does it change back to the default value? (its instance editable and expose on spawn). Thank you, I would really appreciate some help.

| Video | Game Mode BP | Where the function is called |

3 posts - 3 participants