Daily bonus
j75
Member, PRO Posts: 235
How would I go about using the device clock to control a daily bonus actor to appear?
Ideally I would like to set an attribute to true at a specific time of day.
Thanks.
Ideally I would like to set an attribute to true at a specific time of day.
Thanks.
Comments
Create an integer attribute called savehour
Then create an actor with the following 2 rules
If attribute savehour is NOT equal to 12 (or any hour you want) change self.alpha to 0
When touch is pressed AND attribute savehour = 12 (or any hour you want)
Open scene daily bonus
Then put another actor in any scene you want to create the daily bonus from with the following rule
Change attribute savehour to game.clock.hour
Questions: Is clock.hour in a 24 hour format? eg 1PM = 13?
Does the GS previewer ignore clock.hour or does it use the computer's clock?
Uptimistik, I always enjoy looking at your stuff.
I think got it figured out.
If device.clock.hour=12
Change attribute DailyBonus to true
If DailyBonus=true, move BonusActorButton onto scene.
When BonusActorButton is touched, change DailyBonus to false and open bonus scene.
Will check out your example to see how you worked it.
Now I just need to make some sort of timer to tell the user how much time is left until their daily bonus will be available.
BTW @Uptimistik your link doesn't show a download option.
@jesse75 did you ever figure this out to work on different times for the day?
@J75 did you ever figure this out to work on different times for the day?
@stratton.e.matt@gmail.com
you can also look at our off-line timer/daily bonuses/anti-hacking option on APPFormative (link below) if you are worried about people cheating by playing around with the clock time on the device.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com