How to create "object" inside blueprint?

I have custom gamestate BP (parent is GameStateBase).

I would like to create some object as a variable for holding player state (HP, Ammo, Score…)

What is the best way to do this?

I want to have an object so I can use it for enemies in the future.

I tried to create a variable inside my blueprint, but it doesn’t seem to initialize.

We kind of need to use same keywords. Your post is bit of confusing.
I think i can guess what you want, but i am not sure.

in case you want “global variables” i made recently post about how to do it with function library and function.

You can also make subsystem (some c++ required for making c++ class).

And you can use Data Assets to declare default values. You can make multiple data assets that hold same data (variants), then load those into game. Data assets are like blueprint structs that you can keep as separate objects, then load one you need.

However for better answers you need to describe what you want.

Just in short.

In my blueprint I would like to have some object instance like “player state” and also I would like to use some operation over this object like setHealth…

I made a empty object with one variable:

And I would like to use this objekt in another bp:

But problem is that after startup I am getting an erorr:
Blueprint Runtime Error: “Accessed None trying to read property BPObjekt”. Node: Print String Graph: EventGraph Function: Execute Ubergraph BP Game State Blueprint: BP_GameState

Looks like that my object is nullpointer

So i think you want something like variables for your player.

in this topic i made pictures about how to make global variables that are kept in game mode:

You can do same code, but place your variables in player character or player state bp.
Just change function that gets reference to game mode, instead get player character or player state there. And ofc make those variables in that blueprint.

ps.
that acessed nont error happens when reference is either empty or wrong class.

If you’re going to use an Object you have to ConstructObjectFromClass

but i’d recommend ActorComponents