How to Use AI Behavior

Discussion related to Mission design and creation.
Locked
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

How to Use AI Behavior

Post by Manju P L »

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?
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

Re: How to Use AI Behavior

Post by Manju P L »

You will also need to define the Entity Affiliation's and Entity Identification's for your entities. For example, you can create an Entity
Identification for "Friendly" and "Foe", each would need to have a different Group ID.

Then you can use the Entity Identifications within the AI object's Entity Affiliation 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 Entity Affiliation's Foe list to contain the user's Entity Identification.

I should've also mentioned that Entity Affiliation and Entity Identification 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 Entity Affiliation and Entity Identifcation elements allow more complex relationships between entities to be defined.

Some have Give Response like these I have already Done the All the Above Steps Then also my Aircraft is not attacking the Target Aircraft .
If AnyOne Know How to Resolve these Problem Please Explain Me Briefly And Send Any Reference for these
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: How to Use AI Behavior

Post by Rob McCarthy »

Hello,

Is there a trigger present in the scenario to fire the activation actions? Also do the enemy aircraft have weapon systems? How are your entity affiliations set up?

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

Re: How to Use AI Behavior

Post by Manju P L »

Greetings,
Image

I am Getting These Error , If Any one Know How to Resolve these Please Explain Me Briefly.
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

Re: How to Use AI Behavior

Post by Manju P L »

Greetings,

If AnyOne Know How to Attack One Aircraft with Another Aircraft in Prepar3d .Please Explain me Briefly.
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3704
Joined: Wed Aug 24, 2011 1:37 pm

Re: How to Use AI Behavior

Post by Rob McCarthy »

Hello,

The error you are seeing is the Counter Trigger not having any actions to fire when its conditions are met. To test if your behavior is working I recommend creating a simple test scenario with a timer trigger, two weaponized entities, two ActivateAIBehavior actions, and two EntityIdentifications each set to different values.

For one entity add an AIBehavior list and create Attacker and Search Track behaviors. Set each ActivateAIBehavior action to activate both of these and have your TimerTrigger activate this action. Set each entity's AIType to airplane and EntityAffiliation friend/foe setting to the correct EntityIdentifcations and you should see the aircraft with behaviors target and fire on the other aircraft if it is in range of the values defined in the behaviors.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

Re: How to Use AI Behavior

Post by Manju P L »

Hello
Image

I Am not getting Error and Warning then also my Aircraft is Attacking Enemy Aircraft , I am Using Two Entity Affiliation, Two Weaponized Entities, Two Timer Triggers , and not able to See Collisions, If AnyOne Know Solution Explain me Briefly.
Manju P L
Posts: 9
Joined: Thu Jan 18, 2024 5:19 am

Re: How to Use AI Behavior

Post by Manju P L »

Image

Hello, I am using Two F-16 Aircraft, two Separate Entity Identification, Two Timer Triggers, Two AI Activate Behavior Action, Two Different Groups, And i Assigned Foe, Friend, Relation between them, Then Also My aircraft are attacking each other, If anyone know how to resolve these Problem Explain me Briefly.
Locked