Jump to content

Recommended Posts

Posted (edited)

I am trying to improve the air defence in a mission with some lua code.

 

I had a look at the IADS script by grimes:

https://forums.eagle.ru/showthread.php?t=118175

 

It's pretty nice, however the SAMs behave to random for my taste. Therefore I thought 'll try coding a IADS myself.

 

I built a spike in wich an EW detects a target and then checks to see which sam in closest, if a SAM is within firing range EW activates the SAM. For this I would need to have range and height data for all SAMs in DCS. I am also thinking of adding a C3 so if that is destroyed the IADS degrades.

 

In grimes script he has a table of all the SAMs and their range, max alt etc. Is this information available at runtime via lua on a sam object? If possible I would like to refrain from keeping a static table with such values in my code.

 

Also in regards to HARM's:

I tried to get AAA to fire at the incoming HARM's, by setting the HARM in flight as a known target via: https://wiki.hoggitworld.com/view/DCS_func_knowTarget

 

The AAA just sits there idle while the HARM blasts the SAM in to pieces. Does KnowTarget not work for a controller to set a missile in flight as a target?

 

As an alternative I thought of explosions near the flightpath of the HARM to simulate AAA firing at it via:

trigger.action.explosion(Vec3 point, number power)

 

If anybody has a better idea please post, thanks!

 

 

To get SAMs to switch off faster when they are beeing shot at I used:

https://wiki.hoggitworld.com/view/DCS_func_setOnOff

Removing the AI from the controller of a SAM is much faster than switching the alarm state.

Edited by tigair
  • Recently Browsing   0 members

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