Jump to content

Recommended Posts

Posted (edited)

Hi all. I know DCS doesn't like units doing stuff different from their task. Sadly I fiund this one of the most limiting factors when creating a mission. For example, a plane that has a ground attack mission, it is hard to make that later it escorts another plane. It can be done, but you have to work hard.

In my case I have three planes that are not in my group (because they have different tasks to do) and I managed that they follow me to a certain point, orbit at a certain height when finished, and follow me again when I'm back. The problem is when we arrive at the destination airport, it's impossible for me to make them land (not even together; just land). Instead, they consider the last order of "following" me finished and they go directly to their waypoint 1 like starting the mission again. Of course I got a flag that activates an Ai task push to a special advanced waypoint action that forces them to change to their last waypoint (which is landing in the airport), but they ignore this ai task push, and go to their waypoint one, two... etc.

There is no advanced action to RTB or land, the only thing I can do is change waypoint, but, as said, it doesn't work. I was thinking in creating a trigger zone in their waypoint one (which is close to the airport) so when there (and me already landed), they would not go to their waypoint 2 and, instead, turn back and land, but again, no trigger action related with landing. So I only can imagine it working with a Lua, but I don't know sh*t about lua... so I'm a little frustrated.

Anyone can come up with an idea? Thanks in advance!

Edited by Aoi Kaze
Posted (edited)

Okay, firstly can you upload a demo of the mission for us to see how you're trying to do it?

Secondly, what is their last waypoint? If their last waypoint is to land at the base you want them to (and it should be) then you could set that as their new task with the AI TASK SET/PUSH *(you do know the difference between PUSH and SET right? If not check out my post on the 1st page of the Mission Editor forum about the Mission Editor manual).

Do you know about  'TRIGGERED ACTIONS' - that's exactly what this situation calls for. Have it set to PERFORM COMMAND -> SWITCH WAYPOINT to the landing at the base waypoint, and then when you have the right conditions, AI TASK SET this TRIGGERED ACTION.

 

Edited by Elphaba
  • Thanks 1
Posted
7 hours ago, Elphaba said:

Okay, firstly can you upload a demo of the mission for us to see how you're trying to do it?

Secondly, what is their last waypoint? If their last waypoint is to land at the base you want them to (and it should be) then you could set that as their new task with the AI TASK SET/PUSH *(you do know the difference between PUSH and SET right? If not check out my post on the 1st page of the Mission Editor forum about the Mission Editor manual).

Do you know about  'TRIGGERED ACTIONS' - that's exactly what this situation calls for. Have it set to PERFORM COMMAND -> SWITCH WAYPOINT to the landing at the base waypoint, and then when you have the right conditions, AI TASK SET this TRIGGERED ACTION.

 

 

Man, this is exactly what I said I've done already.

As far as I know, the only difference between AI TASK PUSH y SET is that set adds a task to the line, and push puts it the first in the list.

The mission is quite big and complex. It actually only fails at the very end, but if I made a simpler version, maybe I wouldn't have that problem. Thank you anyways... 🙂

Posted
On 4/25/2024 at 4:54 PM, Aoi Kaze said:

Man, this is exactly what I said I've done already.

As far as I know, the only difference between AI TASK PUSH y SET is that set adds a task to the line, and push puts it the first in the list.

The mission is quite big and complex. It actually only fails at the very end, but if I made a simpler version, maybe I wouldn't have that problem. Thank you anyways... 🙂

You can always make an otherwise empty mission on caucasus to just test this trigger stuff out and if that is exactly the same as your big mission and still not working, upload here and I and/or others will take a look for you. 

  • Like 1
Posted
6 hours ago, TEMPEST.114 said:

Have you solved this? Do you need more help?

Sorry, I didn't received your last messages. The problem is I don't even know how could I replicate the series of events that lead to that situation in a smaller scale, and to add the track of the actual mission I would have to fly (successfully) the whole game, which lasts about +1hour. I abandoned it as it is, since I couldn't find a solution, but maybe I'll try to do the mission again and upload it and you can speed things up... But again, I don't think it's something I do right or wrong during flight. It must be something in the ME section, and since I tried almost everything, I'm guessing LUA must be the only way, but I don't know how to even start.

Anyways, TEMPEST.114, thanks for your help and for offering yourself. If you think of something, please, let me know.

 

Posted

Without having seen the mission, what it sounds like is that you're bumping up against the general behaviour of the Follow task, and possibly some misconfigured enroute tasking.

Going back to the next waypoint when a “Follow” is completed is as expected, so the tricky part is figuring out why they consider WP1 to be the next waypoint. Especially if you've already manage to make them swap to two different intervening tasks. There's also the curious quirks of its stop conditions, where there is a built-in “Last Wpt”, but which only really works reliably when you use it to make AI follow or escort another AI. There's also the obvious difference between Follow and Escort, mainly in terms of what they can suddenly decide to do on their own.

So… are you using Follow or Escort?
Are you using this task as a waypoint task or as a triggered task?
Do you have any stop conditions for the task or are you relying on Last Wpt?

 

This is just off the top of my head, and I'd obviously have to experiment, but the way I'd set up what you're describing (at least if the escort is AI and they're meant to protect the player) is:

  • WP1 – orbit over airfield, Flag 1A as a stop condition (and maybe some sensible duration).
  • WP2 – orbit over the target area, maybe some search and engage in zone to keep the skies clear, but that might make things too messy. Flag 2A as a stop condition (and again, maybe some sensible duration) for everything going on there.
  • WP3 – set up for landing (reset stuff like ROE, reaction to threat, jettison and AB restrictions etc).
  • WP4 – land.

As triggered actions:

  • Escort player, Flag 1B as stop condition.
  • Go to WP2.
  • Escort player, Flag 2B as stop condition.
  • Go to WP3.
  • A bunch of fence in actions (ROE, reaction to threat etc).

A couple of trigger zones:

  • A small around the starting airfield -> when the player leaves, trigger Flag 1A; push the first escort task and all the fence-in stuff.
  • Target area or IP -> when the player enter, trigger Flag 1B; push go to WP2.
  • Orbit area for the escort -> when the player enters (or when enough ground targets are dead), trigger Flag 2A; push the second escort task.
  • A bigger around zone around the landing field -> when the player enters, trigger Flag 2B; push go to WP3.

The logic that should ensue for the AI is:

  1. Orbit the airfield until the player takes off. The orbit task ends; the escort task gets pushed to the top of an empty queue.
  2. The player enters the target area. The escort task ends, “go to WP2” (and orbit there) gets pushed to the top of an empty queue.
  3. The player finishes off the targets and/or rejoins the escort. The WP2 orbit task ends; the second escort task gets pushed on top of an empty queue.
  4. The player gets close enough to the landing field. The second escort task ends; WP3 gets pushed to the top of an empty queue.
  5. WP3 tasks get done; proceeds to WP4.
  6. Land at WP4.

What I'm trying to achieve here is that the task queue is almost always empty so even if something breaks, the only thing for the AI to do is to proceed to the next waypoint. Worst case, the player is too darn slow and the escort leaves without them. Keep the waypoint tasks as lean and clean as possible, since the nature of the Escort task is that it they activate once, and then strictly go to the next in the queue, you have to equally strictly control that queue and ensure that there are no task left to be done way back where the escorting started — hence all the stop conditions.

 

…and if nothing else works, Explode Unit (size 1) should do the trick, for certain values of “land” 😄

  • Thanks 1

❧ ❧ Inside you are two wolves. One cannot land; the other shoots friendlies. You are a Goon. ❧ ❧

Posted
22 minutes ago, Tippis said:

Without having seen the mission, what it sounds like is that you're bumping up against the general behaviour of the Follow task, and possibly some misconfigured enroute tasking.

Going back to the next waypoint when a “Follow” is completed is as expected, so the tricky part is figuring out why they consider WP1 to be the next waypoint. Especially if you've already manage to make them swap to two different intervening tasks. There's also the curious quirks of its stop conditions, where there is a built-in “Last Wpt”, but which only really works reliably when you use it to make AI follow or escort another AI. There's also the obvious difference between Follow and Escort, mainly in terms of what they can suddenly decide to do on their own.

So… are you using Follow or Escort?
Are you using this task as a waypoint task or as a triggered task?
Do you have any stop conditions for the task or are you relying on Last Wpt?

 

This is just off the top of my head, and I'd obviously have to experiment, but the way I'd set up what you're describing (at least if the escort is AI and they're meant to protect the player) is:

  • WP1 – orbit over airfield, Flag 1A as a stop condition (and maybe some sensible duration).
  • WP2 – orbit over the target area, maybe some search and engage in zone to keep the skies clear, but that might make things too messy. Flag 2A as a stop condition (and again, maybe some sensible duration) for everything going on there.
  • WP3 – set up for landing (reset stuff like ROE, reaction to threat, jettison and AB restrictions etc).
  • WP4 – land.

As triggered actions:

  • Escort player, Flag 1B as stop condition.
  • Go to WP2.
  • Escort player, Flag 2B as stop condition.
  • Go to WP3.
  • A bunch of fence in actions (ROE, reaction to threat etc).

A couple of trigger zones:

  • A small around the starting airfield -> when the player leaves, trigger Flag 1A; push the first escort task and all the fence-in stuff.
  • Target area or IP -> when the player enter, trigger Flag 1B; push go to WP2.
  • Orbit area for the escort -> when the player enters (or when enough ground targets are dead), trigger Flag 2A; push the second escort task.
  • A bigger around zone around the landing field -> when the player enters, trigger Flag 2B; push go to WP3.

The logic that should ensue for the AI is:

  1. Orbit the airfield until the player takes off. The orbit task ends; the escort task gets pushed to the top of an empty queue.
  2. The player enters the target area. The escort task ends, “go to WP2” (and orbit there) gets pushed to the top of an empty queue.
  3. The player finishes off the targets and/or rejoins the escort. The WP2 orbit task ends; the second escort task gets pushed on top of an empty queue.
  4. The player gets close enough to the landing field. The second escort task ends; WP3 gets pushed to the top of an empty queue.
  5. WP3 tasks get done; proceeds to WP4.
  6. Land at WP4.

What I'm trying to achieve here is that the task queue is almost always empty so even if something breaks, the only thing for the AI to do is to proceed to the next waypoint. Worst case, the player is too darn slow and the escort leaves without them. Keep the waypoint tasks as lean and clean as possible, since the nature of the Escort task is that it they activate once, and then strictly go to the next in the queue, you have to equally strictly control that queue and ensure that there are no task left to be done way back where the escorting started — hence all the stop conditions.

 

…and if nothing else works, Explode Unit (size 1) should do the trick, for certain values of “land” 😄

Wow, Tippis that's a darn long and complete answer! Lemme explain a few things:
1.- The "Escort" option sadly depends on the original task of the AI, so if (as this is the case) the task is "bombing runway" it doesn't let you choose "Escort" in the Advanced Waypoints by defect. Escort would be glorious for the purpose of the mission, alas,  I had to conform with a simple "Follow".

2.- They have their regular AW options set, but when they arrive to their 1 waypoint, they have a "follow" TASK PUSH with a stop condition marked when we arrive to another waypoint way ahead. In that point, we split, they do their things, I do mine.

3.- After a lot of triggered actions and stuff, the three of them (a group of 2, and another group of 1) they go to another waypoint where they orbit until I arrive. In the meantime, if there is an air threat, the group of two go and engage the bandits, the other guy never does it (that is actually another problem I couldn't solve in the mission. I believe it is related with a ROE of weapons free and only designated, because that is the guy who has to bomb the runway and if I let him "weapons free" the f***r starts wasting the durandals bombing other targets instead of doing his jon. Of course there is a ROE change set in the orbit waypoint, but it seems he's pissed off because I gave him the order of attacking the runway, and he will never ever enter in conflict again during the mission) (bigh sigh!).

4.- When I arrive to the area, there is another TASK PUSH so they follow me again. They do, if new threats appear again, the group of two (the brave ones) go and fight them with me. The chicken one, only follows me.

5.- When approaching the destination airfield, there is a trigger so they stop following me (I had to do this because if not, they follow me until I land and they crash), and SUPPOSEDLY they should change their waypoint to their landing one and land and make me a happy man. The don't. They go to their first waypoint, next and so. After a lot of fight and using every trick I know, the bold ones start turning around the airport (infinite fuel) and the chicken moves its landing gear down, but then it seems it never finds the right angle to land, so it too turns and turns forever.

And that is pretty much it.

The mission is this one: https://www.digitalcombatsimulator.com/en/files/3336738/
if
you download it, you can check in the mission editor all the trickery stuff I made so it doesn't work well. 😄

And yes, I am going to explode them in the air just out of pure rage. 😄 😄 😄

Thank, you,

Posted (edited)
On 5/1/2024 at 9:20 PM, Aoi Kaze said:

When approaching the destination airfield, there is a trigger so they stop following me (I had to do this because if not, they follow me until I land and they crash), and SUPPOSEDLY they should change their waypoint to their landing one and land and make me a happy man.

Have you, on them reaching this trigger, set a TASK SET for them to go to their final (and it should be set as a LANDING) waypoint? 

That's how I've done this. 

The TASK SET removes all the other tasks that have been PUSHED to the back of the queue. Otherwise, once they get close to that final waypoint, then the tasks PUSHED previously will reassert themselves and hence, they fly back to where it all started... 

Edited by TEMPEST.114
  • Recently Browsing   0 members

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