Página 1 de 1
How to create Ascending Time?
Publicado: 29 Abr 2017 07:58
por kantigo
Example: 00:00:00
Hour
Minute
Seconds
i have created one but it results to
0:0:0
can you help me? thanks.
Re: How to create Ascending Time?
Publicado: 29 Abr 2017 16:33
por Dow Sher
viewtopic.php?f=3&t=2683
No es exactamente lo que buscas pero puedes adaptarlo, hace tiempo lo hice para otro usuario
Re: How to create Ascending Time?
Publicado: 29 Abr 2017 20:59
por NicolasG
On Global Functions
seconds = ("00");
minutes = ("00");
hours = ("00");
On Timer
if(tonumber(seconds) < 9)then
seconds = ("0"..seconds + 1);
else
seconds = (String.TrimLeft(seconds, "0") + 1);
end
if(seconds == 60)then
if(tonumber(minutes) < 9)then
minutes = ("0"..minutes + 1);
else
minutes = (String.TrimLeft(minutes, "0") + 1);
end
seconds = ("00");
end
if(minutes == 60)then
if(tonumber(hours) < 9)then
hours = ("0"..hours + 1);
else
hours = (String.TrimLeft(hours, "0") + 1);
end
seconds = ("00");
minutes = ("00");
end
if(tonumber(hours) == 23)then
if(tonumber(minutes) == 59)then
if(seconds == 59)then
seconds = ("00");
minutes = ("00");
hours = ("00");
end
end
end
Label.SetText("Label1", "Time: "..hours..":"..minutes..":"..seconds);
Re: How to create Ascending Time?
Publicado: 06 Jun 2017 08:01
por kantigo
thanks dowsher and NicolasG