uri_ba Posted May 13, 2021 Posted May 13, 2021 Hi all, I want to see if a specific aircraft is carrying a TGP or an ECM pod. Unit.getAmmo() only returns shooty stuff Unit.getSensors() only returns on-board stuff. Unit.getDesc() has nothing interesting. does such a function even exists? (even in a long convoluted way?) Creator of Hound ELINT script My pit building blog Few DIY projects on Github: DIY Cougar throttle Standalone USB controller | DIY FCC3 Standalone USB Controller
toutenglisse Posted May 13, 2021 Posted May 13, 2021 3 hours ago, uri_ba said: Hi all, I want to see if a specific aircraft is carrying a TGP or an ECM pod. Unit.getAmmo() only returns shooty stuff Unit.getSensors() only returns on-board stuff. Unit.getDesc() has nothing interesting. does such a function even exists? (even in a long convoluted way?) You have an answer here : Detect Targetting / ECM pods on aircraft? - Mission Editor Discussion and Questions - ED Forums (eagle.ru) And there is an "event" in relation - I've not tried to see how/when it works : DCS event weapon add - DCS World Wiki - Hoggitworld.com (says : "Currently occurs when an aircraft is spawned in air with weapons. Will occur for each pylon and can return targeting pods.") 1
uri_ba Posted May 13, 2021 Author Posted May 13, 2021 (edited) Thanks! I'll Dig into it. just to make sure, env.mission method is only relevant for aircraft saved in the mission. and the event handler is only relevant for player/clients spawning Airborn. can I read what the player is loading up? or what his loadout on takeoff? Edited May 13, 2021 by uri_ba Creator of Hound ELINT script My pit building blog Few DIY projects on Github: DIY Cougar throttle Standalone USB controller | DIY FCC3 Standalone USB Controller
toutenglisse Posted May 13, 2021 Posted May 13, 2021 27 minutes ago, uri_ba said: Thanks! I'll Dig into it. just to make sure, env.mission method is only relevant for aircraft saved in the mission. and the event handler is only relevant for player/clients spawning Airborn. can I read what the player is loading up? or what his loadout on takeoff? I've not tried so I can't tell much but any of scripting method allows to reach any unit, created by mission editor or script, controlled by AI or player/client. It returns what actually is attached to pylons.
uri_ba Posted May 13, 2021 Author Posted May 13, 2021 In the Unit object there is no Payload or pylons. none that I could find. Creator of Hound ELINT script My pit building blog Few DIY projects on Github: DIY Cougar throttle Standalone USB controller | DIY FCC3 Standalone USB Controller
Grimes Posted May 13, 2021 Posted May 13, 2021 Sadly no. Its been requested. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
toutenglisse Posted May 14, 2021 Posted May 14, 2021 21 hours ago, uri_ba said: In the Unit object there is no Payload or pylons. none that I could find. It can work with the function "DCS event weapon add". The thing with this event is that it works only when a unit appears, so to use it in a mission you need to first load the script, and 1 second later activate all the groups/units/player-slots that you want to be able to reach by script later to see their pods/loadouts. Won't update if rearm, or jettison, and a table must be created to be populated with loadouts for each unit you want to be checked. Here an example. Player F18 (parking hot) and AI F16 (runway) appears at time=2seconds. When you spawn in your F18 you see messages that show the 2 tables getting populated with pylon stuff (I created 1 table per aircraft). Then with F10 radio menu you can (for testing) : 1) spawn a 3rd scripted AC airborne and see his loadout (incl. pod) 2) display your loadout (incl. pod) 3) display if you have a TGP and what type (same than previous but each pylon is compared to valid pod names and displayed if valid) 4) display the F16 loadout (incl. pod) 5) display if F16 has a TGP and what type test-pod-detec-Mist.miz
uri_ba Posted May 14, 2021 Author Posted May 14, 2021 It does not work when player changes weapon loadout. If it would have been triggered on rearm as well, it would have been awesome Creator of Hound ELINT script My pit building blog Few DIY projects on Github: DIY Cougar throttle Standalone USB controller | DIY FCC3 Standalone USB Controller
Recommended Posts