How do I Make a Enemy Target a player and shoot them

0 favourites
  • 4 posts
From the Asset Store
Shoot balls to destroy as many blocks as possible, at each stage the game will become more difficult.
  • So i'm currently make a game and i want the Enemy to target the play and to shoot them but its been confusing can some please help Thanks

  • Just go to File -> New and look up the turret behavior tutorial.

  • Need more info?

    Is the enemy a moving enemy and is it a platform or RPG style game?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • distance(enemy.x,enemy.y,player.x,player.y) < 200

    enemy >rotate angle towards pos player.x,player.y - speed 10

    subcondition every 1.2 seconds - create bullet at imagepoint 0 /set angle movement enemy.angle

    =====================================

    event condition separated for bullet or you can add it in action above on every 1.2 seconds when bullet is created automatically gets the angle.

    =====================================

    bullet on created set angle movement enemy.angle

    =====================================

    bullet actor must have bullet behavior on it.

    you can add a event for bullet getting destroyed

    =====================================

    bullet traveled > 500 px

    or

    bullet on collission with player - action destroy.

    =====================================

    and a event for player life substraction you will need a localvariable or a number set on the player.

    =====================================

    player on collision with bullet substract "your value" from life

    =====================================

    thats the simple code. you will need to adapt that to C2 event system. but its mostly what the event language looks like.

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