Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
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.
Project with expected logic using only the event system
Develop games in your browser. Powerful, performant & highly capable.
Kyatric thank you! that sample helped a bunch.