How do I make enemy shoot at player

0 favourites
  • 7 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • I am trying to make the spider shoot at the player.I know it doesn't make sense to make a spider shoot but i am just trying to make a game logic that works then will replace assets later.

    I need to do the following

    1)Spawn a spider and spiderbullet on a tree that is visible on window

    2)Make the spider shoot at the player

    3)If the player bullet hit the spider destroy spider and bullet

    Check the capx dropbox.com/s/f5vf7jz0w2kqfey/workingdemo.capx to see my attempt thus far

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I changed the name of "Spiderbullet" to "Spidertower" cause it was a tower you wanted, I guess. (it has the tower behavior)

    I cloned the "Bullet" and named the clone "Spiderbullet" it's the bullet for the "Spidertower".

    If you don't understand, let me know.

  • Thanks a ton for the reply Pandadoor...

    "spiderbullet" is in fact the clone of bullet.I used a different sprite to know what is going on?

    I want the spider to aim the spiderbullet at the player and then release the spiderbullet like a bullet to hit the player.Remove the conflicting behaviours as you see fit

    Here is the updated capx

    dropbox.com/s/f5vf7jz0w2kqf ... .capx?dl=0

  • Your link doesn't work but I worked on the previous version.

    (In your capx Spiderbullet wasn't a clone, it had the tower behavior)

    I removed the clone, now "Spidertower" = "Spiderbullet" (it has both behaviors, tower and bullet)

    You have to add the bullet behavior to the Spiderbullet sprite AND set the initial state of the bullet behavior to Disabled

    You should add the Destroy outside layout behavior to.

  • Thanks once again for the help and sorry for the wrong link.Now its almost done but the angle of the bullet isn't right.The tip should hit the player

    What am i missing here

    Latest-> dropbox.com/s/f5vf7jz0w2kqfey/workingdemo.capx

  • You edit the SpiderBullet sprite in the editor and you rotate 90° (clockwise or anticlockwise) and that's it.

  • Thanks a ton mate ....work perfect

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