How do I make enemies not come too close to the player?

Get help using Construct 2

Post » Thu Nov 26, 2015 1:14 pm

I am making a top-down shooter and the enemies are just rushing towards me while shooting when they see me. How do I make them stay for example 128 pixels away from me?
B
8
S
2
Posts: 55
Reputation: 654

Post » Thu Nov 26, 2015 1:27 pm

You could add a condition to the event that makes them rush towards you..

system compare two values: distance(you.x,you.y,enemy.x,enemy.y) > 128

Maybe you need to have an else event to stop their movement, that all depends on the way you have set things up..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Nov 26, 2015 2:54 pm

Ok thanks!
B
8
S
2
Posts: 55
Reputation: 654


Return to How do I....?

Who is online

Users browsing this forum: Ajbael, drexegar, Phacanu, Yahoo [Bot] and 8 guests