Attribute for time played
reddotinc
Member Posts: 653
This is aimed at TSB (Star Daze HD) but I'm sure others might be able to help
I'm looking at trying to record the amount of time played on my game within attributes, and was just wondering the best way of doing this? I've got a couple of ideas in my head, passing numbers between seconds, minutes, hours, but was wondering how other people may have implemented this?
Thanks
I'm looking at trying to record the amount of time played on my game within attributes, and was just wondering the best way of doing this? I've got a couple of ideas in my head, passing numbers between seconds, minutes, hours, but was wondering how other people may have implemented this?
Thanks
Comments
It may damage your frame rate though, not too sure.
Using (game.Time) just monitor the start and stop points. That's what I did for the Photics: Toolbox - the stopwatch. Instead of adding a timer, I added some attributes and rules.
The attribute stores the total time passed while the game is in play. You can then convert the information into something more pretty when you want to display it.
It involves math... as the game time just keeps counting. It doesn't care about hours and minutes.
You could use rules...
If recorded time = 60
change recorded time to -60
change minutes to +1
There might be a more elegant approach, but that's the general idea I'm thinking of.
Heh... that seems like a serious resource hog though.