How do I Make A Range Enemy

0 favourites
  • 4 posts
From the Asset Store
Give Sound to the enemies that are part of your game! :)
  • I am making a survival type of game except the enemies run towards you and you have to defeat them before they defeat you. (I plan on porting it to the mobile platform but that later)

    What I want is for the player to run onto the screen, and once he becomes a certain distance from the player he starts throwing projectiles. I can get the enemy to work when the enemy is on the right side of the player, but I'm trying to have enemies spawn all around the player.

    How do I make the player the object that the enemies base their position off of on either side of the player, then stop and attack. (I got the attacking part, just running on to the screen and stopping from either side is where I'm stuck)

    Thank You

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There's a behavior called LOS, or Line of sight. Check some tutorials about this, it'll help you a LOT to do this game

  • I thought that behavior was for patrolling but now I think about it (now that you mention it) that might just be crazy enough to work lol thanks

  • For each enemy

    System compare two values : distance(enemy.x,enemy.y,player.x,player.y) < 150

    enemy spawn projectile

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