Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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 am making a game project, and in that game project I need to make a timer that starts when touch a object and stops when I stop touching that object, and have no idea how to do it.
Develop games in your browser. Powerful, performant & highly capable.
Just need to add this condition and action:
Is Touching Sprite => add dt to timer
+ Add Touch plugin
+ timer is a global variable
+ dt is an expression in construct
Then you want to display it, add a text object:
Set text for text object = timer
Hi, thanks for the help, but I phrased it in the wrong way, I need help because I want to make so that when the character comes in contact with a certain object a timer starts, and when the caracter is no longer in contact with the object, the timer stops.
So you can replace on touch with on collision.
Then you set a boolean equal true.
When the boolean is true, start to add up the timer.
In parallel, you count down X secs after non-interact, count to 0 the boolean back to false and the timer will stop.