Jump to content

AI Flight Trigger's + Radio Item


Recommended Posts

Im looking for some help in creating a SEAD flight of f/a-18's that the player gives them a go code from a waypoint they have been set to obit. I've Looked thought the forums and see how you put in RADIO items when a group gets to a set waypoint. But im wanting the RADIO item to be the trigger for the AI flight to push to there Next waypoint.

Link to comment
Share on other sites

That's easy.

 

Add the radio item in the trigger list:

 

Trigger type: MISSION START

Condition: Time less 10sec

Action: Add Radio item "F-18 attack" - Flag 1

 

Then you add the F-18 and the waypoints.

Lets say the F-18 should orbit between WP1 and WP2.

So add a Property to WP2: "Switch Waypoint -> WP1" and the Condition "Flag 1 false".

 

Till the Flag is not active the F-18 will orbit between WP1 and WP2.

Once you activat the Flag 1 by Radio item the F-18 will leave the orbit.

Link to comment
Share on other sites

Last I checked flag 'false' waypoints conditions don't actually work, you need to use flag 'true'. Edit: more to the point, the GUI won't let you specify that the flag must be 'false'.

 

What I would normally do for this scenario is to add the radio trigger as Dragon said (which will cause Flag 1 to be set when the player activates that radio option), and set the SEAD flight as follows:

 

Assuming you want it to orbit between WP1 and WP2, add a 'perform task -> orbit' to WP1, make sure it's set to Racetrack and an appropriate speed. The flight will then orbit between those two waypoints forever.

 

Then, select the "STOP CONDITION" button to bring up that dialog, and tick the "Flag" and make sure it's set to 1: i.e. stop when flag 1 is true.

 

That way, the 'orbit' command will continue until the player activates the radio item, and then they'll start processing any following commands at that waypoint, and fly onwards to waypoint 2.

 

Make sure you set ROE to 'return fire' or 'hold fire' on their first waypoint. You can then set it back to 'open fire' after the orbit task.

 

I have a similar set-up in the mission attached to this thread if you'd like to look at an example.


Edited by nomdeplume
  • Like 1
Link to comment
Share on other sites

You can also use triggered actions to attack specific units or groups, or waypoint actions such as search and engage (within zone) to get AI to attack only what you want them to attack.

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

Link to comment
Share on other sites

You can also use triggered actions to attack specific units or groups, or waypoint actions such as search and engage (within zone) to get AI to attack only what you want them to attack.

 

How do you do that?

My scenario is similar to the original, but I believe it requires a bit of branching.

 

I want the F18s to orbit between WP1 and WP2 until I select a radio command. There are three radio commands, and three possible targets. Only one of those targets should be attacked.

 

I believe this could be done if there was a way to remove AI's waypoints from flightplan during flight. :noexpression: In that case it would go like this:

 

AI F18's flightplan:

WP1 orbit

WP2 orbit

WP3 "target alpha"

WP4 "target bravo"

WP5 "target charlie"

WP6 return to base

 

So if I send the code for target alpha, I would like it to cause the F18s to proceed in to WP3 and remove WPs 4 and 5, thus returning home after WP3.

Same goes for other targets: if I send a code for target bravo, then WPs 3 and 5 are removed and so on.

 

Any ideas? :helpsmilie:

Link to comment
Share on other sites

You can't add/remove waypoints during the mission. So forget that.

 

What you can do is use a 'switch waypoint' command with a condition. Or indeed, several 'switch waypoint' commands with conditions.

 

Let's say your radio option 'Alpha' sets flag #11 true; 'Brava' sets flag #12 true; and 'Charlie' sets flag #13.

 

  • Add a trigger with condition FLAG #11 TRUE OR FLAG #12 TRUE OR FLAG #13 TRUE -> Set flag #10 (this will be the 'start' flag for the flight)
    • You'll probably also want to remove all the radio items when this is triggered

    [*] WP1 Needs the following commands, in this order:

    • orbit until Flag #10 is true
    • Switch waypoint -> WP3 IF FLAG #11 is true
    • Switch waypoint -> WP4 IF FLAG #12 is true
    • Switch waypoint -> WP5 IF FLAG #13 is true

     

    [*]WP2 is just the end position of the orbit, and doesn't need any special commands

    [*]WP3 "target alpha"

    • Add targeting information for target alpha
    • Switch waypoint -> WP6

     

    [*]WP4 "target bravo"

    • Add targeting information for target bravo
    • Switch waypoint -> WP6

     

    [*]WP5 "target charlie"

    • Add targeting information for target charlie
    • Switch waypoint -> WP6

     

    [*]WP6+ egress route back to base

Obviously, WP3/WP4/WP5 don't need to be consecutive. If you need additional waypoints to control the AI behaviour for each target, just add them.

 

Basically, you're just breaking the single flight plan into multiple segments, by adding "switch waypoint" commands to send them to different parts of the flight plan.

 

If your targets are all close together so the AI can detect them, or if you're happy to use the "attack target" script, you can use triggered actions instead. The way described above is more flexible as you can easily implement completely different flight plans depending on the chosen option.

Link to comment
Share on other sites

Hk guys,

 

I am still trying to figure out a few things about the ME and for some reason, I fail often to make an AC to ORBIT ??

 

I make several WPs and to one of them I go to the advanced WP actions tab/ADD/PERFORM TASK :

with the following setup :

ORBIT

number 1 (enable) (NOW WHAT DOES THAT NUMBER MEANS???)

no conditions

race-track

appropriate speed and alt

 

and, unfortunately, the aircraft DOES NOT ORBIT...

What am I missing?

(I tried also giving a START conditions of random 100%, but no better)

 

 

Another question: in the CONDITIONS windows, what does mean the

IS USER, NUMBER and TICK MARK on the right ??? is this for FLAGS?

 

Finally, if I want to give a condition to stop orbiting (the day I will be able to make them orbit:(), the way DRAGON explained it how should I word it ? He says :

 

'add a property to WP 2' and he words it 'flag 1 is false' ??

should it be 'flag is false (1)' or 'flag #1 is false' or what???

 

 

thanks

 

 

JF

[sIGPIC][/sIGPIC]

In DCS I fly jets with thousands of pounds of thrust...

In real life I fly a humble Cessna Hawx XP II with 210 HP :D

Link to comment
Share on other sites

it works fine with DRAGONs "system", but i read that "flag is false" dosn´t work in the actual Patch:

 

Try this:

 

- WP 1: Orbit Race Track

- WP 2: Nothing (its the second turning point of the Race Track)

- WP 3 and more: SEAD, CAP and so on.....

- Set "Stop Condition" at "WP 1 Orbit Race Track" with "User is" "1" in the Stop Condition Menu

 

Thats all!:smilewink:

 

"User is" "1" means, that flag 1 gets true (by Radio Item or anything else)

so the Condition "Orbit Race Track" stops and the plane fly directly to the next waypoint - in addition to "Switch to waypoint XY" you can order the Plane with Trigger to fly to the WP you want it to go..... works really fine!:thumbup:


Edited by WRFirefox
Link to comment
Share on other sites

Thanks Firefox,

 

You made me realize something that I dont think is clear in the documentation :

 

IF ONE ASKS FOR A RACETRACK ORBIT, IT WILL RACETRACK BETWEEN THIS VERY WAYPOINT AND THE NEXT whereas WHEN ONE ASKS FOR A CIRCULAR ORIT, IT DOES IT AUTOMATICALLY AT THE WAYPOINT IN QUESTION....

 

Since my next waypoint was far away, I always assumed that my AI was NOT making the orbit...

 

thanks

 

 

JF

[sIGPIC][/sIGPIC]

In DCS I fly jets with thousands of pounds of thrust...

In real life I fly a humble Cessna Hawx XP II with 210 HP :D

Link to comment
Share on other sites

  • Recently Browsing   0 members

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