Hello, I wanted to make health regeneration in my game (if health is same for 1 sec you get +1 health)
I made something like this:
The problem is I will get health every tick.
Is there anything like “if variable is same for 1sec” ?
Hello, I wanted to make health regeneration in my game (if health is same for 1 sec you get +1 health)
I made something like this:
The problem is I will get health every tick.
Is there anything like “if variable is same for 1sec” ?
Hi man , i am really not sure about what are you doing with the “Health”.
If you assign it , to herself , and then after a sec you chech if is equal to herself… it will be Always the same.
I think you should twist your script, and make a script that “if the life is lower than 100” so " increment a timer"
Any action that will change the life amount like damage or heal-up, will reset the timer.
You can use some of the feature that unreal4 have as Timers, or build up a timer by yourself.
Using the time passed out by the tick event , you can add it to a variable, once is >than 1 you can say that at least 1 sec is passed.