Animation IA enemy 8 directions (HELP)Animação do inimigo IA

0 favourites
  • 4 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • how do I identify when such an object is going in such direction?

    for example: this enemy when he moves to the left I want him to do the animation walking to the left.

    but to put the animation in operation I need to know in which direction it is going ...

    summarizing: I want to make an enemy AI with which you chase me when you see me and touch the animation according to the side that is going

    PT-BR: como faço para identificar quando tal objeto está indo para talm direção?

    por exemplo: esse inimigo quando ele andar para a esquerda quero que faça a animação andando para esquerda.

    mas para colocar a animação em funcionamento preciso saber em qual direção ele está indo...

    resumindo: quero fazer uma IA inimiga com que me persiga quando me ver e toque a animação de acordo ao lado que esteja indo

    <img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /> <img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /> prntscr.com/hhe28f

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For 8 direction the movingangle is the direction of movement so moving left would be enemy.8direction.movingangle = 180. When moving to the right then movingangle is 0. Up is -90 and down is 90.

  • I'm using the moveto, so it's like a square that simply moves to reach the player. he does not change Angle

  • Compare the X so if enemy is moving and player X is greater then animation move right, player X is less than enemy then animation move left.

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