ciribob/DCS-CTLD

HAWK Sites still spawn in 'Auto' state, and thus never engage air units.

Closed this issue · 5 comments

Hello,

This is in reference to Issue #65: CTLD-spawned Hawk site won't engage enemy aircraft, it appears the same or a similar issue is occurring with the State the HAWK site is spawned into. It will spawn by default in the 'Auto' state, and thus never engage air units. HAWK sites must be set to 'Red' state to engage enemy air units, and the script does not appear to be doing that.

Tested with the included test mission and CTLD.lua version 20210827.01. Added full hawk site at edge of map with A-50s passing overhead, spawned HAWK crates using aaCrateSpawn trigger, and deployed site. Site begins in Auto state and does not engage until I use CA to set it to Red state.

Thank you for your time.

This was a PITA to figure out. It has nothing to do with auto alarm state because that is the default state all ground units start in and is capable of switching between red and green as needed.

https://github.com/ciribob/DCS-CTLD/blob/master/CTLD.lua#L4450 appears to be the cause.

Setting a mission task with multiple waypoints for units that can't move causes that group to be unable to engage. Even occurs with editor placed groups. Will report that aspect of it to ED. However it would be a good idea to check the speedMax value in description for the units to filter out any that might be given a move command. https://github.com/mrSkortch/DCS-miscScripts/blob/master/ObjectDB/Air%20Defense/Hawk%20pcp.lua#L25

How bizarre! Thank you very much for the investigation!

For now I can just remove the task completely anyway, but something must've changed with this behaviour DCS side.

To be fair, it does sort of make vague sense, as it's trying to move so won't engage until it completes that action? And it can't, so the state machine gets stuck.

Does forcing the red state rather an auto make a difference too?

To be fair, it does sort of make vague sense, as it's trying to move so won't engage until it completes that action?
It depends on the unit in question, but even mobile sam sites will slow down or stop if a target is detected to shoot at it. It is a bit of a gray area because something like the SA-11 radar should be stowed when it moves, but situations exist where it ignores that behavior.

Setting red via CA "fixes" it. Didn't try it with scripting. By making it state red its always on for longer ranged ARM shots to guide to. Though even with auto setting the radar range is sufficiently large it'd be on most the time anyway.

Donno why they are given a task to move half a meter to begin with on spawn. In trying to figure out why it was borked I copied and spawned the exact table that was sent to mist.dynAdd to see if it was substantially different than an editor placed group that got cloned. It functioned perfectly well without an extra script setting ROE or alarm state. Which led me to seeing whatever CTLD was doing to it after spawn.

The move was actually to fix a similar issues years ago where without it, they didn't do anything

I'll just remove the task entirely as it's not needed.

Really appreciate this as I've not had the time to look, nor do I think I would've found this!

Fixed in latest release. Thanks again @mrSkortch !