How do I create an enemy AI turret ?

1 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Another noob question here. I tried using this "Enemy AI for Range of Fire and Line of Sight" tutorial but doesnt seems to able to get it to work very well as i dont have any objects that blocks line of sight and for some reason the AI spams the shooting at the player.

    1) how do i create a AI turret that attacks the player when player or enemy comes into range?

    2) how do i set the rate of fire for the AI / player ?

    Thanks for any advice !

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Use the turret behaviour on an object, or your turrets. Im on my tablet right now so its a pain to type. Look at the manual. Its really easy to use. If youre still having trouble with it, let me know ans tomorrow i can build a quick example on my laptop and exaplain it better.

  • I tried using turret behavior for my enemy but it doesnt do anything when either a) the player comes within its range or the enemy comes within range of the player.

  • Alright ! I managed to sort of get the turret to work except the for the wrong angle of rotation ! Thanks alot ! Now i just need some help with having a rate of fire for the player...

  • You can use a simple statement like,

    If the turret has aquired a target and once every 1 second then

    spawn bullet at turret

    Hopefully that gives you an idea. If you need any help, let me know. I'm near my laptop today.

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