Time event

GamepencilerGamepenciler Artist/Game DeveloperMember, PRO Posts: 326
edited December 2013 in Working with GS (Mac)
For example I want to create a coin bonus pop out that is specifically date every 25th of every december. Is that possible? how can I link the attribute to a specific time?

Artist/Game Developer / Animator at your service..

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    Hi @ecanhoj Make a boolean, let's call it CoinBonus

    In an actor (even outside of the visible scene) put

    Rule: When game.Clock.Month = 12 and game.Clock.Day = 25 ---also add game.Clock.Hour & game.Clock.Minute if you wanted--
    Change Attribute CoinBonus to true

    And in your bonus coin actor

    When CoinBonus is true
    Change Attribute CoinBonus to false
    Change X position or alpha to 1, etc….

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GamepencilerGamepenciler Artist/Game Developer Member, PRO Posts: 326
    thanks @gyroscope i will try to experiment on it

    Artist/Game Developer / Animator at your service..

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    edited December 2013
    I wouldn't put hours and minutes on your rules because that would require them having the app open at the exact time before they got the coin bonus.

    Keep in mind that if the coin bonus is a real game changer then some players will reset the device clock multiple times to stack up a nice collection of coins. I would!
  • GamepencilerGamepenciler Artist/Game Developer Member, PRO Posts: 326
    oh i see... I also wonder what happens if close and re-open the app on the same day then the pop up bonus will always pop up.. then cheat

    Artist/Game Developer / Animator at your service..

  • KevinCrossKevinCross London, UKMember Posts: 1,894
    For that you can set a boolean to be true when the bonus is collected/used and set it to false when it's not the 25th of December, this way they can use it each christmas, and only once per christmas, unless of course they change the time back on christmas day to an earlier date which sets it to false and they put the clock back to the correct date (christmas day) which triggers the bonus again.
  • KevinCrossKevinCross London, UKMember Posts: 1,894
    What you could do is have a rule and boolean for each upcoming christmas, and once the christmas has passed set the relevant boolean to true (and never reset it) i.e.

    If date = 25/12/2013 and christmas2013 = false
    give gift
    Set christmas2013 = true
    Save attribute christmas2013

    If date = 25/12/2014 and christmas2014 = false
    give gift
    Set christmas2014 = true
    Save attribute christmas2014

    If date = 25/12/2015 and christmas2015 = false
    give gift
    Set christmas2015 = true
    Save attribute christmas2015

    etc...

    They can still put their clocks forward but they'll only ever get the gift once
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you need a real-time counter that works even when the app is closed or in the background, I have a virtual pet template available in my signature.

    But if you just want to check the calendar day you don't need it.

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

  • GamepencilerGamepenciler Artist/Game Developer Member, PRO Posts: 326
    edited December 2013
    yeah i was planning to make a vitual pet game where there is specific quest when time its at noon , night or day.. then there is bonuses when the player opens the app on specific holidays. But i'm quite burn out for other things, just want to ask these questions ahead before i get my head back in the game

    Artist/Game Developer / Animator at your service..

Sign In or Register to comment.