I’d like there to be a countdown clock (like a basketball shot clock) on the screen where the player has to complete certain tasks within a couple minutes. I don’t know how to build the clock or the logic of when time runs out... (i guess when ‘timeleft’=zero set a global variable?).
if there’s code out there that does it, with the graphics files too... that would be 👍.
Thanks in advance.
Browser.ExecJS("Date.now()")
will get you the number of milliseconds since 1/1/1970. If say you wanted a 30 second shot clock, you add 30000 to that number then look to see if the current time <= to the shot clock.
Thanks so much, I’ll give it a try.
Develop games in your browser. Powerful, performant & highly capable.
Project with expected logic using only the event system
Kyatric thank you! that sample helped a bunch.