Allow 1 action per day in GameSalad
Im working in a project that I want a restriction based on time. Is possible to implement this?
Example: Theres a button what make a action, but I want to restrict the use to 1 action per day (resets 24 hours after the use). Its that possible using(saving attribute) and probably, device clock/timer?
Thanks in advice for the fastest help with my past questions. Game Salad Community is the best!
Example: Theres a button what make a action, but I want to restrict the use to 1 action per day (resets 24 hours after the use). Its that possible using(saving attribute) and probably, device clock/timer?
Thanks in advice for the fastest help with my past questions. Game Salad Community is the best!
Comments
when you first use the button save the current hour to "last time used hour" the current minute to "last time used min, and for "last time used day", change that to current day plus one
in your rule have if all are true, the current min, hour, and day are greater then "last time used min, hour, and day" let them use/do the action again and save the new attributes so they can't use for the next 24 hours
But I have another way
Make an attribute action used? Bool false
When button touch is press or whatever you have and action used is false, do action and then change it to true
When attribute action used is true timer after 86400 seconds change it to false
That way you can do change the time you want for the user, 86400 secs is a day
Calvin
@calvin9403 - I will test your method, seems the way I want it, because the time controller. Thanks!
Those Methods are passive right? The user don't need to have the game/app running to time goes down?