Works while app is closed....

charliehgreencharliehgreen ArizonaMember Posts: 233
I was wondering if it's possible to create a rule in gamesalad that would allow something to continue working while the app is closed.

For example, Simpsons Tapped out. When you add a house it takes real time, and after I close out and come back to the app tomorrow, or pass the time expected. It's done.

Is there a way we can do something in GS that will allow us to place a real time frame on something and still works once the app is closed?

Comments

  • TheGabfatherTheGabfather Member Posts: 633
    Did you know that GameSalad Creator has the ability to make your app access the device's time? :)

    You can access it via the Expression Editor using either or a combination of the following:
    game.Clock.Year
    game.Clock.Month
    game.Clock.Day
    game.Clock.Hour
    game.Clock.Minute
    game.Clock.Second

    game.Clock.Millisecond

    This measures Device Time (i.e. your iDevice's system time, not the game's running time) so it'll always be ticking. Go and experiment with that + saving Attributes :)

    Good luck!

    p.s. You access it via Devices > Clock, NOT Game > Time.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I built a template that measures how much time has passed since the app was closed or made inactive (another app took over the foreground).

    You can see it by clicking on the Templates link in my signature.

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

  • charliehgreencharliehgreen ArizonaMember Posts: 233
    Thanks both
    Hmmmm but let's say I want after 1 hour for a house to appear.

    How would I say that inside of using the real time?

    I can't say When Clock.Time.Hour = 9:00 change because what if someone starts playing at 8:58 then that won't before because he will only have to wait 2min.

    For example, this video says there's a template but where is the template?
    (2:09 Mark)

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    You don't check if it's 9 am or 10 am, you store the current time regularly while the game is playing which stops updating when the app is closed. You then check the time when it's opened and diff the two times to see how many minutes or hours there are between the two. If it's longer than an hour you run the rule to build a house.
  • DenimSharkDenimShark Member Posts: 192
    Check this out too
Sign In or Register to comment.