Jump to content

If fired on, How to go into orbit/holding pattern until threat is cleared


Recommended Posts

Posted

Say you have a flight that gets attacked en route by some ground fire. I want them to report the threat, turn around and return to the previous waypoint, and wait there until the player clears the threat and radios all is clear.

 

Can this be done? I can see the last half: orbit at the waypoint until a special radio item is issued by the player? But how do I get them to return to a previous waypoint and orbit there until they get the all clear ONLY after they get all clear?

 

One complication: the exact point on the route at which they will encounter the threat is random.

 

If the the above complication is too complicated, then I guess I can work around it (i.e. the leg of the route where the resistance is encountered is fixed, by the exact point on the leg is random).

 

Or is the whole thing too complicated?

Posted

Try using the "switch to waypoint" function (inside the trigger action tab of the airplanes you want to hold in the orbit ... and it's gotta be in triggered actions tab, not advanced waypoint thingy) Then you'll have to use an "AI TASK" or "AI PUSH" to make that happen in the triggers.

[sIGPIC][/sIGPIC]

The Museum Relic Campaign: --> http://forums.eagle.ru/showthread.php?t=164322

Community Missions (SP & MP) --> https://forums.eagle.ru/showthread.php?t=205546

Posted

Are any other units on the map firing weapons at the time?

Have weapons already been fired in the mission?

 

If not, you can use the ON SHOT event to detect when a unit has begun firing, and use the waypoint switch as Apache describes.

 

If weapons have already been fired in the mission, you will need to use a flag to gauge the rough time the aircraft will be attacked. When he enters X area, for example, FLAG ON. Then ON SHOT event, FLAG IS TRUE (1) as a condition and the AI TASK PUSH action.

 

If weapons are being fired throughout the whole time, you'll need to use a .lua script to determine when your ground unit has fired.

 

Another alternate way around is to just use a moving zone and assume the guy will be shooting when your aircraft enters it.

 

Create a trigger zone the size of the unit's rough threat radius (watch when he starts shooting at your AC using the F10 map)

 

You can then use the UNIT INSIDE MOVING ZONE trigger to detect when the aircraft is inside of your ground units' threat radius. This, in conjunction with ON SHOT, might actually be your best bet now I think of it.

 

Have to go to work now but good luck!

Posted

Thanks all!

 

So my first few attempts at this did not work. Turns out I need a rather convoluted collection of waypoints.

 

Waypoints 0 through N-3: normal waypoints along route

Waypoints N-2 and N-1: holding waypoints far off the route

Waypoint N: final (landing) waypoint.

 

At Waypoint N-3: I have a "perform command, switch to waypoint N", thus skipping the holding waypoints, N-2 and N-1, and going to the final waypoint N.

 

Waypoints N-2 and N-1 are the orbiting waypoints (N-2 switches to N-1, and N-1 switches to N-2).

 

Then I have two triggers.

 

Trigger #1: pushes the "switches to waypoint N-2" event.

 

Trigger #2: pushes the "switches to waypoint X" event, where 0 < X < N-2; i.e., the "resume" route command. This trigger is a radio call issued by the player when the threat has been neutralized.

 

The issue is now, as you @feefifofum point out, picking a good trigger for trigger #1!

 

I've tried the following:

 

Pilot #001 is damaged

OR

Pilot #001 is dead

OR

Pilot #002 is damaged

OR

Pilot #002 is dead

.

.

.

 

This sort of works. Problem it takes actual (real) damage or worse for things to be triggered. Not a big deal, I suppose, as long as the entire group does not get wiped out or too heavily damaged at one go. Which might seem unlikely if the threat is just one Zsu 23 and the group is multiple helicopters, but that AI can see through trees, has 100% instant SA etc. and does a pretty good job of taking out most of the flight in seconds! But, anyway, perhaps a bigger problem is that it is a PIA to set up for large numbers! If I have multiple groups consisting of multiple units, EACH one must be added to that list twice (once for damage, and another for dead).

 

As an alternate to the above, I like the idea as you suggest, @feefifofum of a small zone around the ground unit + UNIT INSIDE MOVING ZONE + ON SHOT for this. The downside of this though is if I want random placement of the threat. I do this by creating multiple threats along the route, and activating them randomly. With the zone approach, I will have to create the zones and triggers for each one of the random threat. I guess could minimize the work by creating a few large engagement zones and within each zone creating multiple threats of which one might be activated at random.

 

The idea of a lua script to handle all this seems interesting! If it can be coded, then the work of creating/managing multiple triggers actually becomes easier even the entire workload remains the same, thanks to all the power of text editors. Any suggestions or ideas what that lua might look like and how it can be executed?

  • Recently Browsing   0 members

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