Help With Health/Power Regen Function ?
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
asked Jan 01 '16 at 09:53 PM in Blueprint Scripting
Found a way to do it
answered Jan 02 '16 at 01:49 AM
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.
Follow this question
Once you sign in you will be able to subscribe for any updates here