Greetings everyone, I am trying to add an function that tracks the amount of blood splatters in the surroundings of the character, the more splatters the more will the progress bar be filled and if the player pushes a specific button, it removes a certain amount of blood from the environment and lowers the progress of the bar by a specific value. But I do not have a clue how I can implement this or how to get started with that.
Thanks in advance.
It really depends on how you’re spawning the splats.
Are they decal actors? Are they spawned in damage events?
If the player character blueprint is spawning them as an actor when you attack something, you could make a splatters variable on the char, change it to an array, and add a reference to each splat as it’s created.
The UI widget could then get the variable from the player, and use the array length to set the value on a progress bar.
When it’s time to use the blood, a function or event could have a For Each Loop which steps through the array and destroys each actor reference. When loop is complete, clear the array, and the progress bar should reset.