Jump to content

Check if a unit is detected..


Go to solution Solved by Wrecking Crew,

Recommended Posts

Hi pilots and mission designers,

Is there a way in mission editor (a trigger or something else) to check if a certain unit (human or ai controlled) is detected by enemy radar?

Ie, a flight is tasked to keep as low as possible, but when is detected enemy fighters scramble to intercept them. Or viceversa if a enemy unit is detected friendly forces come to life to intercept them.

My scripting skills are way less below zero... 🥴

Thanks a lot. Have a huge weekend!

"If you low&slow you're BBQing, if you hot&fast you're grilling, if you low&fast you're flying an Apache"

Link to comment
Share on other sites

Posted (edited)

You will need to use scripting for this if you want it to cover all possibilities easily.

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

If you want a lesson or two, let me know via DM's. I helped @markturner1960 with scripting stuff, you can ask him. 

For the mission editor you're much more restricted.

You can fake it by detecting if every unit busts a hard-set altitude and then release all your QRF groups.

You can use SEARCH IN ZONE for units to 'hunt' for specified groups but it's less flexible than scripting.

You can have SAMS look for targets, and if found, set a flag that you can use to release all your QRF groups etc... 

It depends what the minimum is that you need. 


Edited by TEMPEST.114
Link to comment
Share on other sites

  • Solution

Here is a mission file from @Black6 that I am going to work with.  One of his scripts does the 'detect enemy aircraft with search radar'.  I am hoping to use this for low level flight Blue ac vs a Red SAM site.  I am starting with this from his mission..

 

Do Script
-- Flat Face detection
local DetectingUnit = Unit.getByName('P19')
local TargetUnit = Unit.getByName('Tiger-1')
if Controller.isTargetDetected(DetectingUnit , TargetUnit , Radar) == true then
 trigger.action.outText('detected by Flat Face', 10)
 trigger.action.setUserFlag( "11", true )
end

 

Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.

Link to comment
Share on other sites

thanks a lot @TEMPEST.114. your post is very above any expectations! Unfortunately i don't have so much time in learning from zero, so i think i have to decline your kind proposal.

I marked as solution the post of @Wrecking Crew because, in reading the thread he submitted, there is a suggestion to take that mission and edit it in order to achieve qhat i want.

 

Thank a lot! You are very helfpul!

 

  • Like 1

"If you low&slow you're BBQing, if you hot&fast you're grilling, if you low&fast you're flying an Apache"

Link to comment
Share on other sites

  • Recently Browsing   0 members

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