Between 11:15 and 12:00, I created a damage system node, and now I want to make a “Game Over” node that gets triggered when the character’s health reaches 0.
How can I create a node that executes when the current health becomes 0 (e.g., Current Health == 0 or Max Health == 0)? Could you please explain it to me in detail?
We could build on top of the tutorial you shared, but to keep the project clean and organized, I’d recommend breaking the logic for certain different mechanics into actor components and handling them there. This refines the player character’s Event Graph (or the .cpp file for C++ projects) from anything other than core mechanics such as moving, jumping, firing, etc., makes the code more readable, avoids having confusingly similar variable / function names, and makes the additional mechanics such as health, stamina, etc. modular.
Check out this tutorial to see how to set an actor component for your health system:
As for your original question:
You can check if the player character should die upon damage like this: