Jump to content
Crimson Mage

Make AI Wingman Stay Somewhat in Formation

Recommended Posts

I am making a aircraft mission and the player has an AI wingman. But every time I test the mission the AI just blasts off and does its own thing. I set the group to keep formation but he still does it.

Share this post


Link to post
Share on other sites

For air parade: separate waypoints for each plane and forceSpeed.

Share this post


Link to post
Share on other sites

If the above suggestions don't work I believe you could write a simple loop that does the following:

  • Disable AI of wingman pilot (so he no longer steers)
  • Get current velocity, vectorDir, and VectorUP of player vehicle
  • set wingman's vehicle to that velocity, vectorDir and vectorUp

This should force Wingman to maintain relative position.  You could build in a little lag between getting player's speed and vectors and applying the speed and vectors, so wingman's turns aren't immediately synchronized with player (more realistic).  You can script a way to end the loop upon whatever condition you want, like a player Action menu, or nearEnemy, or player's group goes into combat mode, etc.).  When ending script you re-enable Wingman AI so he takes control of bird again.

 

Also, just for scenic formation fly-bys with no player or AI, you can use this script:  JBOY Fly In Formation.  I know that's not what you are currently asking for, but maybe someone else will have a need for it.

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×