Hi I know this is an old post but was hoping for some insight- I'm playing around with the idea of a virtual pet in Decker, and something like this cooldown button would be a very good way of showing when a pet's needs are low or high. I'm trying to figure out how I can integrate actions of feeding and caring for the pet to reset the cooldown, eg. if the happiness meter (functioning like a cooldown slider) is starting to get slow, I could press a separate button like 'give pet a treat' which could make the pet happier and therefore when pushed it would trigger a reset of the slider to its original state. is there a fairly straightforward way to implement this?
You could modify this contraption example to allow external events to reset the timer, but you really don't need a contraption at all to keep track of cooldowns; just an animated widget and some scripting. I recommend reading the sections of Phinxel's Phield Guide on Timing and Animated Widgets, as well as viewing the prototype script of the above example.