Jump to content

Recommended Posts

Posted

Hello!

 

Since I have no idea or knowledge about LUA or programming and I wasn't able to find anything like this anywhere, I came here to make a special request to mission scripting community:

 

Could you, please, make a script for Air Policing routine?

 

I'll try to describe as thoroughly as possible what I need:

Normal procedure for Air Policing mission goes like this: the Bogey is intercepted by QRA flight (2 ship). Flight leader takes 'Eyeball' position, meaning he flies a very close formation with the Bogey and tries to identify it - Country of origin, markings, insignia, tail number. In case of no radio contact, he flies in close proximity to the Bogey's cockpit to get attention of the crew and to assess their condition and intentions. If the Bogey is violating the airspace or a special order to force it to land is in effect, the QRA Leader rocks his wings - international signal 'Follow me'. The bogey should respond the same way. Meanwhile, QRA Wingman takes 'Shooter' position right behind the Bogey in optimal weapons range. When they reach target airport, QRA leader deploys his landing gear and rocks his wings, which means 'Land at this airport immediately'. The Bogey reacts the same.

 

What I need is to make a script for AI that would replicate such behavior. If, for example, a client in a multiplayer game flies within a certain range of the AI plane and rocks his wing, the AI will respond in the same manner and follows the player. When they reach an airport of player's choice and the player shows the landing signal, the AI would comply and land.

 

If anyone needed any further explanation or have any question, please don't hesitate to contact me.

 

Thanks in advance and Best regards!:thumbup:

 

Bimbac

Posted

I didn't know that. Thanks for explaining.

 

I was just wondering: it could be accomplished by faking a waypoint switching behavior, but it may be easier to ask ED to implement this directly into AI routines.

 

It would be interesting to fly such missions, because this is the most common mission flown in peace time.

 

If anyone finds a suitable way to replicate this using available tools, I'd be extremely grateful.

Posted

My script here: http://forums.eagle.ru/showthread.php?t=126703

does somewhat what you want. There are no rocking of the wings implemented, you just fly sufficiently close and stay on the bogeys wings for it to switch to its last waypoint that could either be to land on an airport or follow the player or anything else.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Posted

Thank you very much!

 

Dumb question though: How can I implement the script into a mission? (I've never done that before...)

 

Could the script be modified in such way that the Bogey would follow you if you rock your wings? (Also, if the Bogey lights up his nav lights, that would be awesome. I have noticed that mission triggers could be set appropriately when player's aircraft bank angle reaches a certain value. So this combined with switching waypoints, flying into the zone and making Bogey Invisible to AI, so he could land even at the airport, controlled by other coalition, would pretty much do what I need, given current DCS capabilities.

Posted

Detecting if the player rocks his wings is possible if you can come up with a sufficient mathematical model of what it means to rock your wing (e.g. "bank angle exceeds 15 degrees left, then 15 degrees right within 2 seconds") to distinguish it from normal turns.

 

While it would not involve any expensive calculation (it's just a comparison), the check would have to execute several times per second for each aircraft that is being checked, so there might be performance problems if you try to do it for a lot of clients in MP at once. You might have to optimize it to only check for rocking wings once the aircraft is sufficiently close.

 

Make AI fighters rock their wings by switching waypoints:

might be possible, would require experimentation.

- calculate two waypoints A and B that are offset 45 degrees to the left / right of the bogey's current heading

- call pushTask() with a "Mission" task to fly to waypoint A

- call popTask() a second later

- call pushTask() with a "Mission" task to fly to waypoint B

- call popTask() a second later

 

Nav lights: doesn't seem to be possible, at least I found nothing about lights in the scripting engine docs.

Posted

That's exactly what I'm looking for. At least for a start.

 

Rocking wings in general terms means changing your bank angle 15 deg. left and right within 5 seconds at least 3 times.

 

Flying close enough to be seen from the Bogey's cockpit is anything less than 1000 ft, but depends on the wingspan and overall size of the Bogey, meaning smaller=closer. But 1000 ft distance as a reference would do.

Altitude difference must be less than 200 feet up or down.

  • Recently Browsing   0 members

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