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?
Comments
gyroscopeI am here.Member, Sous Chef, PROPosts: 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….
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!
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.
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
tatiangMember, Sous Chef, PRO, Senior Sous-ChefPosts: 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.
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
Comments
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….
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!
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
But if you just want to check the calendar day you don't need it.