Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits) (+2)

sleep[] looks a bit unsatisfying, as the card is not interactive as it waits, so the label isn’t that readable.

I have tried this:

Make a textfield to store a timer (here I used “timer”) initially set to 0. You can put it on another card if you want to hide it out the way.

Card:

on view do
 timer.text:timer.text+1
 if (timer.text<0) & ((10%timer.text)=0)
   display.text:display.text - 1 
 end
 go[card]
end

Button:

on click do
 timer.text:(display.text+1)*-10
end

Edit: I was late to the party. Using sys.now as suggested above sounds like a more suitable approach :)

Using the same "view[] refreshing" strategy is definitely the best way to do something like this if you want to be able to interact with the rest of the card while the timer is running.

You can also make the "secret timer" field invisible if you want to hide it on the current card.

https://cptnqusr.itch.io/super-cool-timer

here's the finished timer! not exactly the greatest thing ever but as a first project i'm quite happy with it