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 am creating an application that should work like this: there sprites with drag drop behavior. And the screen there sprties the square, where to place the sprites with drag drop, when put in the right sprite wanted to lock them with drag drop on the screen
on drop
if sprite1 overlaps sprite2
sprite1 set position to spirte2
sprite1 set drag&drop disabled
I need the lock happens when a sprite is on top of another
Develop games in your browser. Powerful, performant & highly capable.
so just use the condition: isOverlapping
or you can check the distance between them
if distance(sprite1.x,sprite1.y,spirte2.x,spirte2.y) < 20