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
Hello, I want to create an event where it restarts the layout after sprite1 and sprite2 collide/overlap for 3 seconds.
I know how to get it to restart after the instant collison but dont know how to make it only restart after 3 seconds.
thanks
Develop games in your browser. Powerful, performant & highly capable.
Using the timer behaviour would work..
Sprite1 on collision with sprite2
start timer for 3 seconds
sprite1 is not overlapping sprite2
stop timer
on timer
restart layout
Quick one from the top of my head.
Create "collisionTime" variable. When objects collide start counter, and add 1 to "collisionTime" every second. If collision breaks then clear "collisionTime" if not then restart layout when counter = 3.