How to Get variable in HUD to use in Blueprint ?

I create a menu that let me chose level in game (normal, hard …) when I choose it My AI enemy will be stronger ( I increase max walk speed for them) but it not work. I’m newbie please helps me :((

Hi ,

for transferring information or values between levels, you could create a custom game instance and have in there a variable for the difficulty. When you open the new level, you call the game instance, cast it to your game instance, set the difficulty variable and the open the new level and close the existing.

Now in the blueprint of the new level you could, trigger by “on begin play” call again the game instance, cast it to your game instance and get the difficulty value out of it and they use it where you want.

Hope that makes sense.

Regards,

1 Like

Hi ,

has this worked for you?

Regards,

I’m looking for a solution to transfer score, coin count and heart life over. WOuld this method work?