need help with a script

ok so this is kind of hard to explain but what i need help with is making the players life(which is set at 100) go down by 1 point ever minute.

var life = 100;






function OnGUI () 
{
	GUI.Label(Rect(0,300,80,30),"life: " + life);
}


function Update()
{
	var Ctime = Time.deltaTime * 60;
	
}

thats the code i have got so far all i really need is to know how to make the life var go down by 1 ever 1 minute.

any help would be much appreciated.

and just one more thing if anyone knows any tutorials on unity script then could you please link them i am trying to learn how to script.

Hi,
I’m just learning as well but I think I can help you out.

var life = 100;
var elapsed_time : float = 0; //I put this here so you can watch the time go up in the Inspector

function Update(){
 elapsed_time += Time.deltaTime;
 if(elapsed_time >= 60) {
   life -= 1; 
   elapsed_time = 0;
 }
}

You can use coroutine or InvokeRepeating to execute function every minute that decreases player health by one.

thanks alot mate that works great thanks for your help.