Jump to content

AI Task - Triggered Action / problem with waypoints


Recommended Posts

Posted

Hello

 

I'm having problems with the triggered actions of the AI choppers. Most probably I'm simply doing it the wrong way.

 

What I want to do is the following

 

- After the start, I want the AI to follow the player

=> Triggered action Nr. 1: Follow - player

- When the player reaches a trigger zone, I want the AI to no longer follow the player. It shall go to his waypont nr. 3

=> Triggered Action Nr. 2: Follow - nothing

=> Triggered Action Nr. 3: change waypoint (3)

 

At waypoint 3 (which is in the trigger zone), I set an advanced task (landing)

 

In the trigger zone, I use

AI Task, FollowNothing

AI Task, ChangeWaypoint3

 

However, as soon as I reach the trigger zone, the AI decides to fly home. It for sure doesn't fly to waypoint 4. Can't say it about waypoint 3 because it's in the trigger zone. But it seems like the AI doesn't land at waypoint 3.

 

I hope it's understandable. Easily said, I want the AI to stop following me but to fly to all it's waypoints.

 

Maybe there's a better, easier way because mine doesn't seem to work...

Posted (edited)
Hello

 

I'm having problems with the triggered actions of the AI choppers. Most probably I'm simply doing it the wrong way.

 

What I want to do is the following

 

- After the start, I want the AI to follow the player

=> Triggered action Nr. 1: Follow - player

- When the player reaches a trigger zone, I want the AI to no longer follow the player. It shall go to his waypont nr. 3

=> Triggered Action Nr. 2: Follow - nothing

=> Triggered Action Nr. 3: change waypoint (3)

 

At waypoint 3 (which is in the trigger zone), I set an advanced task (landing)

 

In the trigger zone, I use

AI Task, FollowNothing

AI Task, ChangeWaypoint3

 

However, as soon as I reach the trigger zone, the AI decides to fly home. It for sure doesn't fly to waypoint 4. Can't say it about waypoint 3 because it's in the trigger zone. But it seems like the AI doesn't land at waypoint 3.

 

I hope it's understandable. Easily said, I want the AI to stop following me but to fly to all it's waypoints.

 

Maybe there's a better, easier way because mine doesn't seem to work...

 

Quite tricky to get it to work, as I have done it in a few missions before.

 

IE From memory:

 

For the AI flight: Waypoint 1 commands

 

  • Follow Player > Stop condition = Flag 1 true
  • Switch waypoint = 3

 

Trigger Stop Following

 

  • When player in zone Set Flag 1=true

 

Waypoint 3

  • Land

For the AI flight to follow and leave correctly you have to put the "follow command" in with a flag condition to stop doing it when the player has reached the zone (Using a trigger to set that flag to true) and you also have to have the "change waypoint = 3" command directly after the "Follow order" in the same waypoint 1.

 

(This is because when the follow command is considered terminated, the AI will always fly back to the waypoint 1 were the follow command was issued and then follow its waypoints from there, this may look like it is returning to base, if you have the change waypoint=3" command after the follow command it will instantly change its flight path to waypoint 3 instead of flying back to waypoint 1 and continuing its assigned flight path).

 

Probably clear as mud, but that is the jist of it I think.

 

Regards, Ian.

Edited by MadDog-IC
Added example of how to do it
  • Like 1

Asus p877v-pro, Intel I7 3770k 4.2ghz, 32gb Ripjaw X ram, Nvidia RTX-2070 Super, Samsung 32" TV, Saitek x52 pro Joystick and Combat rudder pedals, TrackIR 5, Win8.1 x64 with SSD and SSHD protected by (Avast AV).

 

DCS Tech Support.

Posted

Unfortunately I'm still having some troubles. Things seem to work better now, but I encountered another issue.

 

The following situation:

 

AI WP 0:

=====

1. Silent=yes

2. Follow Player, Last Waypoint (of player) 3

3. Change Waypoint (of AI) 2

 

AI WP 1:

======

(nothing; I could theoretically delete this WP because the AI is following the player).

 

 

AI WP 2:

======

1. Land

2. Change Waypoint (of AI) 3

 

Well, the AI lands, which is fine :-) But it doesn't start anymore once it landed. I tried it with and without "Change Waypoint".

 

Shouldn't it simply start again and fly to WP3?

Posted
Unfortunately I'm still having some troubles. Things seem to work better now, but I encountered another issue.

 

The following situation:

 

AI WP 0:

=====

1. Silent=yes

2. Follow Player, Last Waypoint (of player) 3

3. Change Waypoint (of AI) 2

 

AI WP 1:

======

(nothing; I could theoretically delete this WP because the AI is following the player).

 

 

AI WP 2:

======

1. Land

2. Change Waypoint (of AI) 3

 

Well, the AI lands, which is fine :-) But it doesn't start anymore once it landed. I tried it with and without "Change Waypoint".

 

Shouldn't it simply start again and fly to WP3?

 

 

Nope... Once landed, it's over.

Posted

Depends - if your AI WP 2 is a landing WP (at a FARP or airbase) then landing is forever.

 

If you're using a "Perform Task - Landing" then it can take off from that. But only when the Landing task is finished. You can either use a duration - there's an "On land" thing where you can enter the amount of time it spends on land - or the usual stop conditions.

 

Since it's a "Perform task" type of foreground task, it won't process the next waypoint commands until it has finished. So the switch waypoint won't be run until the task is ended.

  • Like 1
Posted (edited)

Well, I did some testing. You can let the Huey start again once it landed, but...the initial problem appears after that. The AI ignores the command to fly to the next WP.

 

 

AI_Landing_Starting_Example.miz

 

If you want to see the behaviour, press F2 after the mission starts, to switch to the 2nd Huey.

 

- 2nd Huey follows 1st Huey till WP1

- 2nd Huey changes WP to 2 and ignores WP1

- 2nd Huey lands at WP3

- 2nd Huey starts again

- 2nd Huey gets the command to fly to WP4

- 2nd Huey ignores this and returns to base (WP5)

 

So I'm just wondering if there's really no way to overcome this problem? I was thinking of a workaround with a WP with low speed and low altitude, but you can't set the WP altitude lower than 98 AGL.

 

Edit: Sorry, didn't see the message #6 of Nomdeplume when I was posting this.

 

And completely off-topic, but why are my attachments in the posts always without icon and size information? :cry:

Edited by rge75
Posted

Sorry for the double post - after reading Nomdeplume's post, I finally got it working. The problem was that I didn't understand the "on land" thing (on german "Auf Land" which didn't make sense to me).

 

Just in case somebody else needs it once, here's the wokring example file.

AI_Landing_Starting_Example.miz

 

It does the same as mentioned in the previous post, except that it will continue with the next waypoint after landing.

 

Thank you, Nomdeplume :thumbup:

Posted
Depends - if your AI WP 2 is a landing WP (at a FARP or airbase) then landing is forever.

 

If you're using a "Perform Task - Landing" then it can take off from that. But only when the Landing task is finished. You can either use a duration - there's an "On land" thing where you can enter the amount of time it spends on land - or the usual stop conditions.

 

Since it's a "Perform task" type of foreground task, it won't process the next waypoint commands until it has finished. So the switch waypoint won't be run until the task is ended.

 

Ups, sorry, I thought we talked about planes.

 

Yes, you can use advance task. But the way it lands... for an arimobile assault, I cant get it to land properly, it sucks

Posted

Oh yeah, I should have mentioned the helos ;-) Unfortunately, you can't make 'em doing a "Vietnam landing" - at least I didn't find out how. But if you let 'em fly at low 60 knots and 98 AGL, then it isn't "that bad". It's at least cool when you land at the LZ and the other Huey's are doing the same in front of you.

Posted
Oh yeah, I should have mentioned the helos ;-) Unfortunately, you can't make 'em doing a "Vietnam landing" - at least I didn't find out how. But if you let 'em fly at low 60 knots and 98 AGL, then it isn't "that bad". It's at least cool when you land at the LZ and the other Huey's are doing the same in front of you.

 

Can you post a mi to see how you do it?

Posted

I don't want to post it here because the mission will be part of a full campaign. But I can send you a PM once I'm at home.

However, maybe it was pure luck that it once worked. The AI seems very unpredictable and when I last played it, they landed a lot later than I did.

 

All I did was setting the speed for WP3 (the landing WP) to 60 knots and 98 AGL (the lowest possible) though. Then I set the "Land" trigger at WP3 and draw the line a few feet outside the WP. The idea behind this is, that the AI already has a good speed/angle for landing. Sometimes it seems "ok", sometimes not. It may depend where I land or where all the other Huey are during the landing approach. With that said, my solution for sure isn't perfectly working.

  • Recently Browsing   0 members

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