Set another map's variable for difficulty settings

Hi all,
I wish to create some difficulty settings for my game. To avoid having 3 separate copy pasted maps for that. I wish to set the game map’s variables from the main menu, that’s on another map. How to do this?
OR:
How to change the difficulty? In my case the difficulty means an int, that is the number of tries the player can have and I need to set the map’s difficulty from another map (as mentioned).
Thanks in advance.

The GameInstance Blueprint will persist trough a map change. Any variables set in your mainmenu that need to persist trough load have to go there.

However for your problem after setting your iDifficulty, when you hit your start game button, create a switch on iDifficulty and have it connect to multiple openLevels with different mapnames.

Alternativ when you set your iDifficulty, also set a string mapName. In your startgame function you can then open a level based on said string.

Thanks for the help.
How to implement such thing? I have the game logic in my level blueprint by the way.

By the way I see only game mode BP (using 4.12). is that something different?

You need to create a custom blueprint of type GameMode for your Game Logic and GameInstance for load persistent variables. (Only if absolute=false in openlevel)
Ps. I updated my previous post, check it again

So basically you say I need to create different maps for different difficulties?

simply the answer is no, you don’t need to make different levels @agiro (you just want to change chances according to difficulty ,right?)

what @Heidi here tried to explain was that when you have made the menu in one level and widget appears asking for difficulty, suppose player chose easy then you opened the level where game is and the level difficulty which you set earlier needs to be recalled and normal variables can’t save themselves between level changes

so the role of game instances come in they can save variable when level changes and that is what @Heidi explained

so how do you set this up?

first make an game instance.
like this

just set variable in menu from umg in game instance

get the same variable in same manner where required

Hope it helps!

Yet again here to save the day :smiley:
I did model one or two weapons, a candle, a book and a pair of swords, a scene made of stone parts (skyrim styled) back then, Some of them has textures for PBR setup (and uvs of course) and some of them just modeled as they were not used. Want them?

no, but thanks for the deal :smiley: ,i figured out you were good at modeling and texturing as soon as you mentioned you made textures of 3d meshes(by rendering them?,i guess)

Yes, all is pre-rendered, with respect to the physical behaviour of M33 tool steel, bronze and high zink brass, all of them slightly corroded, slightly more around the edges, where the damage happens, az least those were used in the scene.
here is my cgportfolio:
http://agiro.cgsociety.org/
got cg as a hobby by the way.

Really Awesome work in Portfolio…

well, words are not enough to describe That…

thanks :smiley: well in any case I feel that way too, I quickly look at the big lads’ works, just to trim my ego back a bit :smiley: