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
when my Player sprite is close to block sprite (less than 100px)
and i click on box > box destroy
but when player is far (more than 100px)
clicking on block do nothing?
I would just use the line of sight behavior.
Develop games in your browser. Powerful, performant & highly capable.
use the compare 2 values condition found under 'System'.
On Mouse.Click is clicking Box
if distance(Player.X,Player.Y,Box.X,Box,Y) <= 0 | Destroy Box
better for performance is use that behavior?
Given your conditions it would be about the same.
Oh yeah. I forgot you could select the barriers for line of sight.
Newt is right