Global variables

Hi guys,
this time i try to get my point & click adventure system starting :wink:
and i have some i guess very basic questions:

is there something like a global variable ?
i need to store global variables that i can access from everywhere in the game and that stays persistent over all levels

examples:

lastlevelname:
this should store the name of the last level visited when i have loaded a new one.
purpose: in some rooms/levels there is more than one starting point, depending from the room (level) i entered the actual room/level. so i want to query this variable in the level blueprint and decide where to put the player starting point
objectstates:
these variables should store info wether an object is in the level or not.
purpose: the player can interact with multiple objects per room/level and i have to set these objects on level start.

i tried to place these variables in my gamemode blueprint, cause i heard this stays persistent over all levels.
but i have trouble getting and setting these variables form level blueprints or other blueprints.

Can anybody show me a tutorial how to do this ( i guess it is very basic unreal stuff, sadly not for me) or is there a better way to achieve this ?

kind regards
stucki

I think youre talking about a game instance. It stores variables across levels and can be cast to from any blueprint

hey, thx very much, this could be indeed exactly the thing i am searching for !
have to dig into this, right now :wink: