Creating AI using Bullet behavior

0 favourites
  • 3 posts
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • I need some help. I'm trying to create an AI that closes in on the player, then backs away after a certain distance. The idea is to create an AI that rushes the player, then goes off to the side while still shooting (strafing).

    <img src="http://i.imgur.com/xDcqr9d.png" border="0">

    For those checking the .capx:

    -CloseRange is the range in which the AI should be close to the player and needs to start moving away.

    -Right now I'm only testing to try to get it work for the player. The AI currently does not detect asteroids and account for them.

    -Please test using keyboard only, since touch controls are not working properly at the moment.

    SpaceGame.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess one of my issues is that as soon as the enemy is outside 'close range', when I set the bullet angle of motion back toward the player, this causes the speed of the enemy to instantly change. There is no acceleration that slows the enemy ship down and then causes it to move towards the player - it just magically changes motion.

    Should I be using CustomMovement for this instead of Bullet?

  • Alright, I've switched to using CustomMovement behavior. It seems to be mostly working now (link is updated).

    However, what's with the fire rate of Turret? It seems to fire really randomly and not according to my set fire rate except in a head-on angle.

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