Profile image

How to make a AI AA

638 SuperLJY  3.2 years ago

How to make a AI controlling Anti-Air Gun?
I tried make the cockpit rotate together with Mini-Guns or Cannons . But they don't fire .
Here's my funky code :
Roll -- (((TargetHeading - Heading) + (rate(TargetHeading) * (TargetDistance / 1500)))/ 180)
Pitch -- inverselerp(0,90,TargetElevation + (rate(TargetElevation) * (TargetDistance / 1500)))

My hinge rotators has range as 90 as code .
Please Help .

  • Log in to leave a comment
  • Profile image
    3,066 Zue5s

    Ohhh i understand now
    You musn't have the cockpit attached to the turret for AI

    +1 3.2 years ago
  • Profile image
    3,066 Zue5s

    @SuperLJY you don't understand.

    3.2 years ago
  • Profile image
    638 SuperLJY

    @Zue5s So impossible to make a AI controlling Anti-Air Gun ? Only AI-SAM works...

    3.2 years ago
  • Profile image
    3,066 Zue5s

    Ok @SuperLJY, you musn't have the cockpit rotate together with your turret.
    Also, for maximun accuracy, you must have your cockpit close to your turret.

    +1 3.2 years ago