Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: MUX on June 08, 2015, 06:50:02 PM

Title: Once Daily Logic [Solved]
Post by: MUX on June 08, 2015, 06:50:02 PM
Struggling with something relatively simple. i would like to reward my user with a bonus once daily after watching an ad.

what would be the best way to approach to check if a user has taken the reward bonus in the last 24 hours?
Title: Re: Once Daily Logic
Post by: jeanfabre on June 09, 2015, 01:39:21 AM
Hi,

 You simply need to save today's date in the player prefs, and everytime the user watch an ad, you check if the date in the player prefs is today, if it is not, you offer a bonus and store the day, else you just say you have already bee awarded a bonus today or nothing.

use GetSystemDateTime to get the date in any format you want ('MM/dd/yyyy' will do for you, you don't care about the actual time).

 Bye,

 Jean