Is this possible?
Hi all.
I wanted to add this to my game and wanted to know if it was even possible with GS
Essentially, I wanted the game to add a life to the players total but importantly, while the game is switched off - like Candy Crush does with a timer.
Can anyone throw some light on this?
I wanted to add this to my game and wanted to know if it was even possible with GS
Essentially, I wanted the game to add a life to the players total but importantly, while the game is switched off - like Candy Crush does with a timer.
Can anyone throw some light on this?
Comments
You can access it via Devices > Clock > (Year, Month, Day, Hour, Minute, Second, Millisecond)
Work out the math depending on your metrics, then implement Saving and Loading of Attributes.
Like in Candy Crush though, this can be cheated by altering your device's system time.
Watch this video.
game.Clock.Second +( game.Clock.Minute *60)+( game.Clock.Hour *60*60)+( game.Clock.Day *60*60*24)+( game.Clock.Month *60*60*24*31)+( game.Clock.Year *60*60*24*31*12)
Add it to a display text behaviour and you'll see it increment every second.
With this you can subtract the two timestamps to see how many seconds between each time and therefore how many hours between each time, while also using the the load and save attribute @TheGabfather mentioned.