How to make a best Enemy AI

For questions about using Classic.

Post » Fri May 06, 2011 2:10 am

hi im a beginner

I need it to shoot and attack me if he is close. Also I need my AI to move freely even though im not in the range
B
1
G
1
Posts: 3
Reputation: 431

Post » Fri May 06, 2011 5:43 am

Without much info, the most straight forward method would be to detect how far away the enemy is from you.
+ System compare distance(you.x,you.y,enemy.x,enemy.y) is greater than n amount
-> enemy do this
+ System compare distance(you.x,you.y,enemy.x,enemy.y) is less than n amount
-> enemy do that
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests