This article is very simple and describes how you can do the simplest digital clock in Game Maker. This is really made easy in v6.0:
time = string(current_hour)+":"
+string(current_minute)+":"+string(current_second)
Game Maker can also tell year, current_year, and month, current_month, and each weekday, current_weekday. Only problem is that all of those functions return numbers, which is usually not what we want when presenting the current month or weekday. Then this is how you could do to manually make sure that the right thing is drawn, not very elegant but it works:
if (current_month==1) {
month = “January” //draw the variable month
}
if (current_month==2) {
month = “February”;
}
if (current_weekday==1) {
day = “Monday” //draw the variable day
}
And so it continues, I bet you get the system. For drawing method I would suggest draw_text, but that very choose able.
.
Users logged in:
Comments
Loading comments...