Death Counter

How to make when I die , to appear always on the corner (like a score system) how many times I died
Thanks

sounds like a basic widget to me. you can simply create a widget with a text component, then bind the value of the text to a variable. when your character dies you simply increment the value of the variable.

overall its a simple thing to accomplish but there is a bit involved to accomplish it. honestly its probably something easier to learn via a tutorial video which im sure there are a ton of out there.

the steps will be somehting like this:

  1. create a variable in your game mode (int deaths)
  2. create a widget
  3. add text component to widget
  4. in the details panel of the text component look for content then text and click the bind button then create binding.
  5. in the binding graph start by getting the game mode via “get game mode” node
  6. drag off the get game mode node and search for cast to (insert your gamemode class here)
  7. drag off the as (insert class here), and search for your variable (get deaths)
  8. connect the variable to the return value of the return node (it should convert the int to text automatically)
  9. last you need to create the widget and add it to the viewport which can de done in a script in the player controller (or many other places.