Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
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
The game I'm working on is an overhead game with 360 degree angle/motion. I'm trying to create an enemy character that can harm the player on collision but only when the player has their back turned away to them. If the player is facing the enemy they are able to block the attack. I know this needs some sort of check on the angle of both objects but I'm drawing a blank on what is the right code to use. Any help is appreciated!
Something like this maybe?
System->Compare two values-> abs(angleDiff(player.angle, enemy.angle))>90
Develop games in your browser. Powerful, performant & highly capable.
Works perfect, thanks dop2000.