Simple AI Aircraft Script

Hei guys, i want to make an AI Airplane for my game. But, i dont know how to made it. Can anyone give a simple AI Airplane script. Just simple AI…

Pathfinding is for calculating efficient routes through terrain. Since aircraft move around in the air, it is not going to be hugely useful (except for maybe plotting paths around mountains).

What you need to do is define a set of conditions that your AI should recognize, and a set of behaviors that you want your craft to display. Work out how to recognize these conditions, and then execute code that makes it behave in the manner appropriate.

Unfortunately your question is too vague to be answered on this forum, you’ll have to do a bit of research. I recommend starting with finite state machines. FSMs are a useful model that can be used for AI and many other game mechanics.

In the sky, the path is everywhere (only limited by the ground …). So as fattie said, this is basically just LookAt.

Maybe what you want is kinematic behavior, acting to the rules of middle school physics (an airplane will not rotate in a blink of an eye, it has to fly a curve etc.). Google for that stuff.

This link could be helpful Steering Behaviors For Autonomous Characters

The AI could be as simple as the desicion where to fly (directly to the player, wabpoint 1-2-3-4 or something).

Harder it gets as soon as you want to have real dynamic flight physics or an AI that makes tactical descisions depending on the enemys and friends movements and situation.

But most likely you will not need complex things. Simple things can look brilliant and be fun, or they even can be a special challange(just look at the WoW bosses and enemys, everything scripted with some randomness and some thresholds for dmg and aggro, no intelligence).

Good luck and have fun!