Real Time Game

Hi everyone,

I'm pretty sure this can't be done but is there a way of detecting the date in a game?

I've managed to give in game rewards for playing a game late at night (10pm) but i'd love to do a real time game like a football manager where you have to wait 3 days for your next fixture and then open the game to set your tactics

Comments

  • shubham3shubham3 Member Posts: 50
    I think there is are many videos on youtube which will lead u forward in this thing
  • Ali_WoodAli_Wood Member Posts: 52
    Ahh @shubham3 thanks.. if you find a video then please post a link as i didn't have much success searching for it on here!
  • JSprojectJSproject Member Posts: 730
    edited January 2014
    A simple way: Create an index or integer attribute "SaveTheDay" then do a change attribute "SaveTheDay" To Devices, clock, day. That will save the current day for you, then just compare the value you want to compare to SaveTheDay (can be done for month etc. in the same way).

    There are also more advanced ways in order to keep track of all time spent between certain intervals, for that you need to spend some time searching the forums.
  • TheGabfatherTheGabfather Member Posts: 633
    The same way you did the checking for 10pm bit. If you used game.Clock.Hour for that, you can also use a combination of game.Clock.Month, game.Clock.Day, and even game.Clock.Year.

    You can get around this by changing your Apple device's clock, though.

    Since you're a PRO user, try to check out the Async Multiplayer features. If i'm not mistaken, you can probably send some data from the server you're using (e.g. actual server sysdate) to users.

    I haven't dabbled with any of those features yet though, just reading through things casually -- but I'm confident it's possible.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I also have a virtual pet template available that handles real-time effects on attribute values even if the app is backrounded or not running. You can click the Templates link in my signature for more info.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • Ali_WoodAli_Wood Member Posts: 52
    This is brilliant advice.. Thanks guys! I think i'll have a look at using the built in game.clock attributes first then maybe the Async stuff
Sign In or Register to comment.