Hi everyone, I'm having a lot of problems trying to make a time system for my game. I want a sturdy time system because I want to make a business managment simulator kind of game, so I have to keep track of the day of the week, the day of the month, the month and the year, so this are my variables.
$hour
$minute
$weekday
$monthday
$month
$year
I need the game to do the basic maths while you are playing, like not going over 59 minutes or over 23 hours. I tried setting up a conditinal.
<<if $minute > 59>>
<<set $hour += 1>>
<<set $minute -= 60>>
<<else>>
<</if>>
Its the only thing that I can think of. For days of the week, I think it would be cool to have like a string of the seven days of the week and that when $hour reaches more than 23, the hour should go down to 0 again and the day of the week and the day of the month should change.
I dont really know if this or something like this has been answered here, but i searched for a bit and didn't found anything useful.
Thank you for your time and I will be happy to listen to every piece of advice that you could give me.
$hour
$minute
$weekday
$monthday
$month
$year
I need the game to do the basic maths while you are playing, like not going over 59 minutes or over 23 hours. I tried setting up a conditinal.
<<if $minute > 59>>
<<set $hour += 1>>
<<set $minute -= 60>>
<<else>>
<</if>>
Its the only thing that I can think of. For days of the week, I think it would be cool to have like a string of the seven days of the week and that when $hour reaches more than 23, the hour should go down to 0 again and the day of the week and the day of the month should change.
I dont really know if this or something like this has been answered here, but i searched for a bit and didn't found anything useful.
Thank you for your time and I will be happy to listen to every piece of advice that you could give me.