How can I change the GameState?

My task is simple:
I have created widget ui in blueprints with a textbox saying “Game over”

I want to learn how to change a game state so when my character dies (variable “damage” in character class becomes equal to 100), my game switches to that state, everything is paused, and ui widget is shown.

How to achieve that task?

P.S. I learned how to show an UI on BeginPlay event using blueprints and exported function from C++ (where widget reference passed from blueprints to C++ side), but how do I show it in my case, and how do I pause the game?

Thank you.

That’s a pretty complicated question for answer hub. Your best bet is to go through one of our learning examples.

I went exactly through them and still don’t have any idea how to achieve what I want from C++

You went through shooter game?

Documentation is pure, absolutely no C++ examples (but excellent tutorials on blueprints), looks like this engine is really targeted on people who love visual scripting, not C++ programming.

I went through this: https://docs.unrealengine.com/latest/INT/Programming/Tutorials/UMG/4/index.html

ShooterGame is C++

Thank you, I will look into that. By the way, can I help on improving the documentation as a volunteer?

That doesn’t handle networking. Changing the GameState should be handled by the GameMode as progress of the game unfolds. ShooterGame is a better example of that.