Jump to content

JTAC Auto Target and Lase


Ciribob

Recommended Posts

I did this so I can optionally make them concentrate on certain targets first. This way I was able to prioritize SAMs ahead of other targets. Other variations are certainly possible. Maybe like a "permitted" option or something that will only allow targets if they have "permitted" in the name if you want them to lase only a bunker or something special. Logic would be similar.

 

https://github.com/ciribob/DCS-CTLD/pull/11

Link to comment
Share on other sites

I did this so I can optionally make them concentrate on certain targets first. This way I was able to prioritize SAMs ahead of other targets. Other variations are certainly possible. Maybe like a "permitted" option or something that will only allow targets if they have "permitted" in the name if you want them to lase only a bunker or something special. Logic would be similar.

 

https://github.com/ciribob/DCS-CTLD/pull/11

 

Thanks! I've actually been meaning to do something like this for a while

 

My method would be a list like so, as well as the specific tag idea you have which is great! :) :

 

{
"AA",
"Manpad"
"heavy-armour"
"light-armour"
"unarmed-armour"
"infantry"
"unarmed"
}

 

I'll hopefully have some time in the next week or so to give this a proper look and a go, but apologies if I don't as I'm busy with Blue Flag and work at the moment.

 

Thanks for contributing! :)

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

Ciribob, I was playing with this script this weekend, the JTAC would find the first target and mark it no problem, after I destroyed the first it would say scanning for targets and and never find any more, mind you these targets were all in one group close to each other. Am I doing something wrong?

Intel 9600K@4.9GHz, Asus Z390, 32GB DDR4, EVGA RTX 3070, Custom Water Cooling, 970 EVO 1TB NVMe

34" UltraWide 3440x1440 Curved Monitor, 21" Touch Screen MFD monitor, TIR5

My Pit Build, VKB Gunfighter Pro w/WH Grip, TMWH Throttle, MFG Crosswinds W/Combat Pedals, Cougar MFDs, Custom A-10C panels, Custom Helo Collective, SimShaker with Transducer

Link to comment
Share on other sites

Ciribob, I was playing with this script this weekend, the JTAC would find the first target and mark it no problem, after I destroyed the first it would say scanning for targets and and never find any more, mind you these targets were all in one group close to each other. Am I doing something wrong?

Nope should be fine... Make sure you use the version contained in CTLD not the version on the first post of this thread.

 

If you post your mission file I can take a look.

 

Are they definitely in range of the JTAC and does he have line of sight?

Scripts: Complete Transport And Logistics Deployment - CTLD / CTLD Examples - Lots of example of how to use CTLD

CSAR Script - Downed Pilot Rescue / Dedicated Server Script - Automatically launch DCS Multiplayer server at startup

Range Scoring Script - Get scores and counts hits on targets for gunnery or bombs / SimpleSlotBlock - Multiplayer dynamic Slot Blocking Script

 

Projects: DCS-SimpleRadio Standalone - DCS Radio Integration for All Aircraft - NO TeamSpeak Required! :)

DCS-SimpleRadio Troubleshooting Post / DCS-SimpleRadio Free Support Channel on Discord

Link to comment
Share on other sites

Attached on the post linked below. Make sure you're setting the unit name, not the group name. It's usually something like Unit #001, etc.

 

In my example you'll see 4 Tunguskas in individual groups. The group names are something like SAM1, SAM2, SAM3, SAM4. But if you look at them the unit names are priority 1, priority 2, priority 3, priority 4.

 

This way of course you could have a mixed group and still prioritize whatever you want within it. Even though I didn't do it like that the Tunguskas could have been all in one group or even mixed in with the armor groups.

 

It's also preferable this way because a group can be spread out and part obscurred and part not and the logic to know if there is a priority target within view would get sketchy fast, so it's based off of Ciribob's code to find the closest target which works similarly.

 

Anyway, in this you should see the AFAC lase the Tunguskas, despite being further in range than most the other targets and then he'll start lasing the others once the Tungaskas are destroyed.

 

Now, if you were to put a 'priority' Tunguska on the other side of the map it'd be ignored as he cannot see it. He still does JTAC for what he can see. That much I tested. Should the priority target come into view he will acquire that next.

 

http://forums.eagle.ru/showpost.php?p=2671232&postcount=50


Edited by xaoslaad
Link to comment
Share on other sites

It has been acting a little weird when using the "priority" function when using two or more JTACs at the same spot. If there are fewer "priority" targets than JTACs, they will not start marking new targets until all the "priority" targets are gone.

 

-I have 2 JTACs on the scene. Let's call them JTAC1 and JTAC2.

-Both JTACs are on "priority" function.

-There are three targets named "priority".

-There are multiple "regular" targets.

-JTAC1 targets one priority target and JTAC2 targets another.

-When I take out JTAC1's target, he will find the last priority target.

-When I take out JTAC2's target, he will not find another target until I have taken out JTAC1's second priority target.

Link to comment
Share on other sites

Try the updated version:

https://github.com/ciribob/DCS-CTLD/pull/11/files

 

https://raw.githubusercontent.com/jmontleon/DCS-CTLD/priority-system/CTLD.lua

 

I think this fixes it. I had 1 priority target, both on priority system. started with one active and he targeted the priority target. Activated a second one next to him and he picked up the closest non-priority target. I left out a bit of ciribob's logic for the loop that is in retrospect important.

Link to comment
Share on other sites

Near the bottom edit

ctld.notifyCoalition(_message, 10, _side)

 

Change 10 to however many seconds you want it to display. There are lots of items at the top to edit. This could be made a parameter at the top to maybe make it a little easier to find as well, but regardless still easy to edit.

 

No number will ever make everyone happy, but you can use the F10 menu to call for dtatus if you miss it too ;)


Edited by xaoslaad
Link to comment
Share on other sites

thank you very much! up to 60 :pilotfly:

 

and dont find status for up to 20..

 

Mhhh an other noob question, after i go to sleep :noexpression:

 

All group in my mission can view radio menu, i don't undertand why.. any idea?

 

radio menu only for a10 group!

Link to comment
Share on other sites

I haven't looked at the ctld code for notifyCoalition but I'd imagine it's calling a DCS function to message the coalition.

 

In the mission editor in the trigger menu you'd see you can message all, coalition, or even a group.

 

What you want should be possible, but you'd probably want to add a group notification function that closely mimicks the coalition notification function.

 

The other alternative might be to do something like make an option to specify a group for jtacautolase, make the notification just a tad more generic and if a group is specified send it to a group, otherwise send it to the entire coalition.

 

I could probably do that given a bit.

 

I also thought for my change it might make sense to make a function to call to see if a target is visible, within range, and not already targeted, since there are now two very similar loops, but haven't gotten there yet.

 

Progress though.

Link to comment
Share on other sites

Try the updated version:

https://github.com/ciribob/DCS-CTLD/pull/11/files

 

https://raw.githubusercontent.com/jmontleon/DCS-CTLD/priority-system/CTLD.lua

 

I think this fixes it. I had 1 priority target, both on priority system. started with one active and he targeted the priority target. Activated a second one next to him and he picked up the closest non-priority target. I left out a bit of ciribob's logic for the loop that is in retrospect important.

 

I think that did it! Thanks!

 

For your next challange, I'm wondering if it's possible to ad layers of priority? Like say, make them mark "priority1" targets, and then "priority2" targets?

 

Also, can I make them target "priority" first, and then only "vehicle" type targets?

 

Thanks again for your help. This script is just amazing.


Edited by EasyEB
Link to comment
Share on other sites

So, I have another question! How do I get a unit to stop lasing?

 

I've tried ctld.cancelLase but the unit just starts lasing again.

 

Cheers!

 

Just do a gun pass on it, that should do it :smilewink:

HW : 4790K @4.6 / GTX 1080ti 11GB / 16 GB / Asus ROG Formula VI / Acer Predator 32" 4K Gsync / X-55 Rhino / Oculus Rift-S / TrackIR

  • Combined Arms/Supercarrier/Nevada TTR/Persian Gulf/Normandy
  • F-16C/FA-18C/AV-8B Harrier/F5-TigerII/SA342-Gazelle/M2000-C/L-39 Albatros/C-101/MiG-21/F-86F Sabre/Mi-8MTV2/UH-1H Huey/A-10C Warthog/Black Shark 2/Flaming Cliff 3/Hawk T1A(RIP)
  • WWII : Spitfire/Bf-109 Kurfurst/Fw-190 Dora/P-51D Mustang
Link to comment
Share on other sites

EasyEB try this one on for size.

 

https://github.com/jmontleon/DCS-CTLD/blob/improved-priority/CTLD.lua

https://raw.githubusercontent.com/jmontleon/DCS-CTLD/improved-priority/CTLD.lua

 

Just use nothing, "vehicle", or "troop" as it was before I made any changes.

 

Priority system is always in effect. use hpriority for your high priority targets, priority for your medium priority targets and everything else will be low priority.

 

I think that's a pretty good range of possibilities.

 

I tried different JTAC's lasing only vehicles, troops, or all, and squishing targets at various ranges in the expected order. Seems to work.

 

Also, not sure it will work. Try ctld.clearupJTAC("groupname") and see what happens, if he stops for good.

 

If that doesn't work I'll see how one might go about doing that later.

Link to comment
Share on other sites

Hey EasyEB, this is exactly what I would have expected with two JTAC following all targets:

https://youtu.be/jPDYa1un4uE

 

I get similar results with two vehicle, two troop, etc.

 

That script in the video needs minor correction as well:

ctld.JTACAutoLase("AFAC", 1688, false, "all")

ctld.JTACAutoLase("AFAC1", 1688, false, "all")

 

I had the last two options flipped, which I figured out quick when doing troop and vehicle; no harm doing 'all' in that case).

 

Are you seeing something different?

Link to comment
Share on other sites

Yes. I can't find what I'm doing wrong.

I run this as a do script:

 

ctld.JTACAutoLase('JTAC1', 1688, false,"vehicle")

ctld.JTACAutoLase('JTAC2', 1688, false,"vehicle")

 

What I get is JTAC1 is lasing by priority, and JTAC2 is just lasing closest as if priority didn't exist.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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