How do I make AI enemyes...

0 favourites
  • 5 posts
From the Asset Store
Units do not overlap each other and use different ways if there are several free ways.
  • How can I make enemies like in this game.

    Subscribe to Construct videos now

    I need them walking arround...following the player and if needed JUMPING trough platforms...or falling from platforms...



  • apply this see if it is what you wanted: if(playerX > enemyX) Then increase enemyX. if(playerY > enemeyY ) Then Jump to platform. so basically how i would do it have it spawn then every second or so have the X of the enemy change to match that of the player. Have the Y of the enemy change depending on wether the player is above or below them. You could also set it so that if the player.X is over say 10 pixels that the enemy should just walk around randomly. Hope this helps.


  • u think there could be a capx file somewhere ?

    thanks 4 the help

  • Depends on how "smart" you want your enemies to be..

    Checking the position of each enemy compared to the position of the player and adding actions based on that would be the starting point..

    By adding more conditions you could make the enemy smarter or dumber..

    One idea would be to place detection-sprites at the ends of platforms and if enemy is overlapping and player.y<enemy.y have them jump down..

    Jumping up and through a platform is only possible if there is a platform above, so checking for overlapping at offset (or any other way that suits you) and basing the jumping action on that could work..

    Perhaps adding the timer behaviour to have the enemies "make decisions" at certain intevals would be of help (this could also prevent the enemies from going crazy)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks

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