I’m relatively new to the Unreal Engine and I wanted to create a “Energy” bar that smoothly decreases a certain amount in a certain time when my character jumps or sprints or whatever I want to put in there later.
I tried something with a timeline but that didn’t work out for me, I also tried a while loop and then a decrease of a certain amount but that didn’t work as well so I made a monster of a script which goes on as many times as i want it to play:
Now I want to ask you if there is a “not so messy” way to do that?
Thank you kindly
Thank you Nawrot for your answer.
I now know that the FInterp is the thing I need. But how can I use this exactly. To function, it should give me every nTh of a second a new energy value to get a smooth transition or am I wrong?
What I think I did here: It transitions from Energy to Energy -0.1 in a time of 0.5 seconds and gives me the values in between in an unspecified time difference.
I think there is a thing that I missed.
DELTA time - you either feed it from event tick, or make node “get game delta time”
Ok, I did that. Now I can change the Interp speed as last variable. When it’s set to 1, nothing happens, when i set it to 50, it skipps to the Energy-0.1 value in the bar. What should I do?
I’m sorry for maybe sounding dumb but I really don’t know how I should proceed.