How do I enemy attack in direction

0 favourites
From the Asset Store
16 Direction Capx
$3 USD
40% off
Rotate & Animation for 16 Direction & Mouse Direction
  • I have a problem with the enemy in my game...

    I want it to attack or shot only once in a while when he is facing to the player direction...

    And I want it to walk to the player direction,and stop walking when its out of range from the player location.

    How do I do that?

    Please help!

    here is a new download link:

    https : / / onedrive.live.com/redir?resid=E432D515DB07E32!1105&authkey=!AFyvxhfupStkPZQ&ithint=file%2ccapx

    remember to remove the spaces at the link!

    before you download my capx file I want to say thank you for giving a hand and helping me!

    I am grateful for seeing anyone helping me!

    Thank you!

  • Try using the "Line of sight" Behavior to make the enemy walk towards the player, and stop walking.

    For the shooting, just set it to shoot after x seconds, or try using a variable to make it at random.

  • You can arrange for me to see the .capx file of your project, I can try to help you with it.

  • ok i will post the capx file now... wait...

  • there it is!

    https : / / www .dropbox.com / s / atjsny1cm7aius3/ herox.zip?dl=0

    the problem is with "enemy2" group...

    To download just remove the spaces.

  • Sorry for the delay in responding is because I am moving this file here, and the file is very large about 40 MB. As far as I programmed, it worked for only one enemigo type goblin2 however the walk is a little strange time to play the animation for more than one enemy type goblin2 these repeat all the actions of another enemy, which is unfortunate, try to figure out why this is happening, what I did seems to work apply to only one enemy of this type in the scene, except that also need to figure out why the walk is this way.

    The link:

    https://drive.google.com/file/d/0B-bh_etMDYP_cmhVYXk5ZDhmVjQ/view?usp=sharing

  • thanks! it works fine now!

    but one last thing,i need to set a die animation to the enemy...

    i fixed an hp bar above the enemy head...

    but it needs a die animation that works with that code...

    i am uploading the fixed capx file.. hold on..

  • there i uploaded...

    https : / / dropbox. com / s / 1pbjo7qsoo83ixp / Herox_1.0.3.capx?dl=0

    just remove the spaces in the link...

  • the death animation sprites are already in .capx are those that I saw there?

  • Is giving error unknown network, I am not able to download.

  • take a look at my new download link...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yes the enemy dying animation is in the capx file but in the event sheet its not working...

  • before you download my capx file I want to say thank you for giving a hand and helping me!

    I am grateful for seeing anyone helping me!

    Thank you!

  • Hello? can anyone help me?

  • Please help!

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