Increase point once per day?

I'm helping a group of pupil to make a mobile pet-caring game: feed them once-per-day anh their happiness level will rise for 3 points. the problem lies in that "once per day" thing - I don't know how to restrict the level-up action to 1 time per day.

How can I do that ? Any suggestions and help will be appreciated,

Best regards,


Drag in a Clock from the Sensors drawer, and TinyDB from the databases drawer.

When you want to feed your pet, first retrieve from TinyDB the tag LASTFEDDATE, default blank.

Take Clock1.Now, and format it as a date, then compare the date against the value from TinyDB.

If the dates match, then the pet has already been fed today.
Otherwise, feed the pet and store the formatted date in the tag LASTFEDDATE.


Wow, just thank you. I got the idea now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.