Profile image

How to make a AI AA

623 SuperLJY  2.6 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,036 Zue5s

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

    +1 2.6 years ago
  • Profile image
    3,036 Zue5s

    @SuperLJY you don't understand.

    2.6 years ago
  • Profile image
    623 SuperLJY

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

    2.6 years ago
  • Profile image
    3,036 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 2.6 years ago