Hey, so I’m currently writing a base player script, and have been looking around to see if I can add two integer values together once every second, or half a second and for the lfe of me, I can’t find anything around, if someone can help me with this, I’d be eternally grateful!
got the current code here:
public void Update()
{
if (curhealth < health)
{
for (int timeBinter = 0; < 500; timeBinter++) ;
{
if (timeBinter == 500)
Regenstat = true;
if (curhealth == health)
Regenstat = false;
if (Regenstat == true)
curhealth + hpRegen;
}
So I need to have “curhealth” and “hpRegen” add together once every second or every specified interval.