Jump to content

Setting up AI behaviour with tasks


Kenan

Recommended Posts

Is it possible to set up airborne AI to react i.e. go offensive when player aircraft is at certain distance from AI? Or when Player Aircraft fires a weapon (missile/gun)?

 

I tried everything I could think of in ME with AI tasks and triggers but the AI simply won't do what I tell it to do.

 

For example, I assign AI to a moving zone..and set triggers to set/push "Weapons Free" task when Player Aircraft inside the AI's Moving Zone but nothing happens.

 

If I set main AI task to "CAP" it will start engaging at 3-4 miles range regardless what task/trigger I create.

 

If I set the main AI task to "Nothing", the AI never engages.

 

I'm basically trying to create a 'realistic' intercept scenario where AI will react/go offensive if certain parameters are met (say, Player Aircraft too close to AI or Player Aircraft Engages AI).

 

Is this possible?

[sIGPIC][/sIGPIC]

Commanding Officer of:

2nd Company 1st financial guard battalion "Mrcine"

See our squads here and our

.

Croatian radio chat for DCS World

Link to comment
Share on other sites

DCS add "default" tasks in the tasks list when selecting a role for the group.

For example, when selecting a group to have the role "CAS", a default CAS task will be added. What you need to do is to remove this CAS task from the CAS task list, as it interferes with any other task you define.

 

Try it out...

 

Sven

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

You need a Triggered Action for the AI group to turn on it's ROE. Start it off set to Green and when the Player gets w/in the moving zone do an AI Task Push Action to run the Triggered Action. Other Triggered Actions could be to search and engage, depending upon the group's Task.

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

You need a Triggered Action for the AI group to turn on it's ROE. Start it off set to Green and when the Player gets w/in the moving zone do an AI Task Push Action to run the Triggered Action.

 

I believe I tried this already (AI Task Push -> WEAPONS FREE) but funny thing happened, when I got close enough (inside the AI's moving zone) the enemy jet (who's main task was set to "Nothing") fired up his afterburners, made a quick turn and than suddenly stopped i.e. resumed normal (non-aggressive) flight behaviour?

[sIGPIC][/sIGPIC]

Commanding Officer of:

2nd Company 1st financial guard battalion "Mrcine"

See our squads here and our

.

Croatian radio chat for DCS World

Link to comment
Share on other sites

Try tasking the AI with Fighter Sweep or CAP. With that type of tasking the AI fighter should be aggressive on its own. But you can manipulate the ROE to get it to do what you want. If bombers bug out on a challenge you can set their Reaction To Threat = Passive.

  • Like 1

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

Do you know the specific unit you want the AI to protect?

If so you can assign them the escort tasking

If you don't want them to fly closely but still engage players who get close to a specific aircraft, you could use UNIT INSIDE MOVING ZONE to trigger AI TASK PUSH -》ROE -》 weapon free or to add the default CAP tasking.

Search then engage in zone has been the only other fighter tasking I've been able to get to work properly in multiplayer due to limitations with recognizing client groups at the moment.

Not quite what you're looking for but a few potential workarounds.

Link to comment
Share on other sites

I believe I tried this already (AI Task Push -> WEAPONS FREE) but funny thing happened, when I got close enough (inside the AI's moving zone) the enemy jet (who's main task was set to "Nothing") fired up his afterburners, made a quick turn and than suddenly stopped i.e. resumed normal (non-aggressive) flight behaviour?

If its main task is 'Nothing' then it won't have any actual combat tasks set. The AI will only do what it's told to do.

 

As Wrecking Crew suggests, set the aircraft's task to CAP or Fighter Sweep (I think CAP would probably be better). You could delete the default CAP task and add 'Search and engage in zone' task(s) to cover the region(s) of interest to give yourself more control over exactly where it will engage.

 

If the group's ROE is set to RETURN FIRE or HOLD FIRE, then it won't engage any targets. Once the ROE is changed to WEAPONS FREE, then it will engage targets that are valid for its tasking. So, you need to have some kind of combat task assigned before WEAPONS FREE will do anything.

 

There is also an option that controls what units the group will engage, but I can't remember its exact name. The default setting is "Only designated" which is why you need appropriate enroute tasks running to actually select targets. You can also change it to "priority designated" amongst others which might allow them to engage targets that fall outside of their actual tasking, but I'd be reluctant to use it due to the possibility of them traipsing off to the other side of the map.

Link to comment
Share on other sites

Thank you all for the info.

I managed to make this work by tasking the AI with "Fighter Sweep" and by using triggers ("Inside moving zone") and AI Task Push (ROE: Weapons Free and then "Search and Engage"). :)

 

I will now try to make it a bit unpredictable by adding RANDOM value into the mix. :)

[sIGPIC][/sIGPIC]

Commanding Officer of:

2nd Company 1st financial guard battalion "Mrcine"

See our squads here and our

.

Croatian radio chat for DCS World

Link to comment
Share on other sites

  • 1 month later...

Sorry, skimming this on my phone... but I've been wondering how to make ai aircraft "dumber". What I mean is for a mission where players are tasked with taking out an enemy awacs... always wanted the enemy ai planes to go from excellent to poor if the players are successful. Never thought about changing the engage conditions. Seems like that might do it. Glad I stumbled across this.

VFA-25 Fist of the Fleet

[sIGPIC][/sIGPIC]

Virtual Carrier Strike Group One | Discord

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...