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:
- create a variable in your game mode (int deaths)
- create a widget
- add text component to widget
- in the details panel of the text component look for content then text and click the bind button then create binding.
- in the binding graph start by getting the game mode via “get game mode” node
- drag off the get game mode node and search for cast to (insert your gamemode class here)
- drag off the as (insert class here), and search for your variable (get deaths)
- connect the variable to the return value of the return node (it should convert the int to text automatically)
- 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.