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 making a platform game and currently Ive got working melee enemies. And I would like to know how to make when enemy is at X distance of pixels that he stops and starts shooting at me.
you can use the system compare action to look at the player.x and player.y vs. the enemy.x and enemy.y and if it is less than a certain amount, have the enemy stop and fire.
could you give me a small example pls, judging by what you said it seems like the thing i need
There is also the distance() function you can use to compare the distance between 2 coordinates
Where? I tried to find it but is it under conditions or actions, and under system or just some sprite in general?
I made a small example. Maybe that can help you understand.
Develop games in your browser. Powerful, performant & highly capable.
Thanks exactly what i needed. Didnt know it was that easy XD