LoginLogin

How to make time based events(Real Time, not in game time)

Root / Programming Questions / [.]

ElzoBroCreated:
I want to try making an animal crossing-esq game but I'm not sure how to make use of the Internal Clock. Any help?

There are some preset values, TIME$ and DATE$. They work like variables that are only retrieved, not set. As in: PRINT TIME$ EDIT: There's a pretty nice tutorial I found somewhere else... I need to find it again though EDIT AGAIN: Here is a link to a page to the old Petit computer wikia.

So could I make it like IF TIME$=12:00:00 THEN PRINT "GOOD MORNING!" or i could put IF DATE$=11-15 THEN PRINT"HAPPY BIRTHDAY!" Also here's my tip for the day, did you know you could put a ? instead of PRINT ?

Also is it possible to make the date only take into account the day and month?

You could cut it off with LEFT$ or RIGHT$. Like ?LEFT$(DATE$,blah) or something

So could I make it like IF TIME$=12:00:00 THEN PRINT "GOOD MORNING!" or i could put IF DATE$=11-15 THEN PRINT"HAPPY BIRTHDAY!" Also here's my tip for the day, did you know you could put a ? instead of PRINT ?
Since TIME$ and DATE$ are strings, then it would be IF TIME$=="12:00:00" THEN blah

TMREAD and DTREAD take time/date strings and separate them into variables. check the manual