How to use AI Behaviors

Discussion related to Mission design and creation.
Post Reply
nhl1996
Posts: 11
Joined: Tue Mar 01, 2022 8:34 am

How to use AI Behaviors

Post by nhl1996 »

I've studied it for a long time, but I know how to use AIBehaviorList.

I read the official documentation of AI behaviors。
include:
Prepar3D's artificial entities support the following behaviors:

Attacker
Combat Air Patrol
Close Air Support
Pursue
SearchTrack
Wingman Formation Flight

But when I used them in simdirector, they didn't work.

For example:
I created Attacker,Combat Air Patrol and SearchTrack,then I created three AIBehaviorActivationActions.
When I drove the plane into the range of AI aircraft, he did not attack me.

Is there an official to explain? Or is there any example for me to understand it?
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: How to use AI Behaviors

Post by Clifton Crane »

Hi nhl1996,

You will also need to define the EntityAffiliation's and EntityIdentification's for your entities. For example, you can create an EntityIdentification for "Friendly" and "Foe", each would need to have a different GroupID.

Then you can use the EntityIdentifications within the AI object's EntityAffiliation element. The idea here is you can create different relationships between AI objects. If you want the AI to attack the user, for example, you would need the AI's EntityAffiliation's Foe list to contain the user's EntityIdentification.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: How to use AI Behaviors

Post by Clifton Crane »

I should've also mentioned that EntityAffiliation and EntityIdentification are new to Prepar3D v5. In prior versions, the same would be accomplished using the "Association ID" on the AI and user objects. Differing Association ID's would cause one another to be considered enemies. An Association ID of zero was considered neutral.

The new EntityAffiliation and EntityIdentifcation elements allow more complex relationships between entities to be defined.

Regards,
Clifton
Clifton Crane
Prepar3D® Software Engineer Sr.
nhl1996
Posts: 11
Joined: Tue Mar 01, 2022 8:34 am

Re: How to use AI Behaviors

Post by nhl1996 »

Thank you very much!
This is very helpful to me!
Post Reply