How do I get the enemy to face player when attacking?

  • Hi all,

    Having an issue after the enemy is attacking the player. The attack animation works fine its just when the enemy attacks they are not facing the Player. How do get the enemy to face the player when attacked? I tried the mirror vs not mirrored but then that messes with the pathing left to right.

    Also a side question....

    I tried the various methods posted here on the tutorials for shooting left but the player still shoots right when facing left any suggestions on either of these would much appreciated.

    Capx for reference

    http://drive.google.com/uc?id=0B7NWymIXUoTBQTFWQjdOOFNUaUU

    :Edit

    Try this link http://1drv.ms/1Ced9cG

  • The link to your capx is broken.

  • HI Linkman

    I'm not sure how else to fix the link I did it the same way as my last post. I clicked that link and worked for me. What happens when you click it?

  • The attack animation works fine its just when the enemy attacks they are not facing the Player. How do get the enemy to face the player when attacked? I tried the mirror vs not mirrored but then that messes with the pathing left to right.

    try to compare your character X coordinate with your enemy.

    if enemy.X < Char.X then set not mirrored (or maybe flip)

    if enemy.X > Char.X then set mirrored

    the player still shoots right when facing left any suggestions on either of these would much appreciated.

    when facing left, set your bullet speed to minus.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi Puntodamar,

    Thanks!!! I got them to attack facing me with your help

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