Hello, I was wondering if anyone could help me on this! I have this clock script and i want it to play a sound and play animations on multiple objects when it hits zero. Help?
#pragma strict
var timer : float = 10.0;
function Update ()
{
timer -= Time.deltaTime;
if(timer <= 0)
{
timer = 0;
}
}
function OnGUI ()
{
GUI.Box(new Rect(10,10,50, 20), "" + timer.ToString("0"));
}