How do i change enemy sprite direction to face the Player?

  • How do i make it so that my enemy sprite's animations change to face the player in an RPG style game? The Enemy has 4 Animations (up, down, left and right) I know that i make the "dummy" sprite and set it to invisible then position the Sprite with the animations onto the dummy sprite, but when he gives chase per the LOS and Bullet behavior, the enemy fails to change his run direction. he chases me up, down, left and right but always faces the same way. Please help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you're going to work the logic in that way then you have to set the animations based on the current bullet angle of motion.

  • How do i do that? And is there another way to do it? Custom movements or something with variables? Thanks for responding.

  • Well the 8 direction behaviour and pathfinding are there for top down RPG games. The way you have done it you need to do something like if player.bullet.angleofmotion is between 45 and -45 then play 'up' animation, between 46 and 135 then play 'right' animation, that kind of thing.

  • Oooooo. Thanks, ill play around with the angle of motion thing. It is in fact sorta Top Down-ish, but i couldnt find any decent tuts on creating a Top down game with all the animations and such.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)