Enemy facing player

Get help using Construct 2

Post » Tue Jul 07, 2015 12:53 pm

Hello to all!

please forgive me if this has been answered in the past, but i couldn't find it. And i am sure it's a total beginner's question. :?

How can i have enemies facing my player?

Thanks in advance
Iordanis
B
15
S
5
Posts: 10
Reputation: 1,086

Post » Tue Jul 07, 2015 1:18 pm

Object set angle towards object x y
Example: http://gyazo.com/49ca7fb27ba42d704e25254e9a73a682
B
19
S
7
G
1
Posts: 222
Reputation: 2,546

Post » Tue Jul 07, 2015 5:49 pm

Thank you for your quick reply :)

I should have mentioned that my test is not top down. With your solution the enemy was facing the player as i wanted, but when the player moved on enemy's back, the enemy followed but upside down.
(i hope that makes sense :P)

I appreciate any help!
Thank you
B
15
S
5
Posts: 10
Reputation: 1,086

Post » Tue Jul 07, 2015 5:59 pm

so you are making a platformer? again there are several solutions for this.

one way would be to compare the x coordinate of the player with the x coordinate of the enemy and then set a animation frame according to it. you can also work with the "flipped" action :)

i think i cant be of much more help here maybe a professional can tell us the most efficent solution?
B
19
S
7
G
1
Posts: 222
Reputation: 2,546

Post » Tue Jul 07, 2015 7:40 pm

Thank you for your help jOschi :)

I will try to experiment with your advise.
B
15
S
5
Posts: 10
Reputation: 1,086


Return to How do I....?

Who is online

Users browsing this forum: jatin1726, Resslx and 36 guests