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
Hi in my game i have sprites who are spawned every 3sec, pink diamonds,
the diamonds follow the x scroll
It's a flappy bird style game, but i have a problem HOW to DESTROY the pink diamonds if they are too close to my obstacles ?
Use distance(x1, y1, x2, y2) Calculate distance between two points.
On second thoughts you could also compare the Bounding Boxes.
Or use Overlapping at Offset,
There are Many different ways...
thanks so much !
You could also create an invisible sprite as a range sprite and use the mentioned on collision or on overlapping on that if you want to go further than the bounding box. Probably a circle would be ideal. :)
Pin that sprite to the player at the beginning of the layout after positioning it where you want it.
Develop games in your browser. Powerful, performant & highly capable.
Thanks a lot, i used your advice of that round sprite for collisions, work perfectly !
Awesome! Glad it worked! I use that all the time for ranging things, like detections and such. Very powerful and in fact you can better its performance if we have the ability to detect collisions with tiled backgrounds instead since they use less memory.
Also, if you have an issue where setting visible to invisible, then instead just change opacity to like 1 or something so collisions still work. :)