Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Edwin Xie on Sun 27/06/2004 23:32:34

Title: Display date? (split from "date system thingy" thread)
Post by: Edwin Xie on Sun 27/06/2004 23:32:34
Umm, I have a related question. I want the player to see the time. How do I do that?
Title: Re: Display date? (split from "date system thingy" thread)
Post by: LordHart on Mon 28/06/2004 08:53:56
Um, most likely by using the GetTime function from the manual... :P
Title: Re: Display date? (split from "date system thingy" thread)
Post by: Scorpiorus on Sat 03/07/2004 10:52:06
Yeah, use GetTime to get the current time and then convert it into a string and display on a GUI label:

repeatedly_execute:

int hour = GetTime (1);
int minute = GetTime (2);
int second = GetTime (3);

string time;

StrFormat(time, "Time: %d:%d:%d", hour, minute, second);

SetLabelText(GUI, LABEL, time);