Run-away monsters only for 1st copy

0 favourites
  • 4 posts
From the Asset Store
75 creature and animal sounds, including real animals and fantasy creatures.
  • Hello everyone, I have a new issue while making my game, I hope you can help me.

    The issue now is that I made a little enemy AI, such as when the player is close to certain weak enemy, the enemy will try to run away from the player when the player is close to it a certain distance. When the player is outside this range if distance, the enemy will only look at the position of the player (if the player is too far to the left of the enemy, the enemy will look only to the left; if the player is too far to the right, the enemy will look to the right).

    And it works! HOWEVER, only for the first instance OR the remaining instance of such enemy, if there are 2 enemies of the same only the first one will work well, the second one doesnt seem to be using this AI effectively, it runs from the player when it comes from the left, but when it comes from the right doesnt move! and neither does it look at the player direction.

    Any ideas how to solve this? See the pic below to see the event sheet I have for this.

    <img src="http://i47.tinypic.com/sxd7df.png" border="0" />

  • Here, i made example for you.

    Hope it's solve your problem, mate.

    runawaymonster

  • Lol something so simple as the For Each was missing, I feel bad, thanks for the help once more man!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • :D feel free to ask, welcome to C2, bro !

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