So I have a power system in the game that allows the user to see in the dark, and I have attached a decay so that the power drains over the course of it being on and if the value reaches 0 the player dies and the level restarts.
I now want to have the power value regen when the power function is off, thus allows the user to use it and mantain it
Max power is set to 100 FYI
Heres what I have so far any help you can provide would be great, still kind of new to unreal engine 4 scripting
Convert your power value to a float. On the first branch of your tick event, in the false exec output, add the delta time to your power. That will regen 1 per second. If you want it faster or slower, multiply delta time by something.