Jump to content

Recommended Posts

Posted

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?)

Posted
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.")

  • Thanks 1
Posted (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 by uri_ba
Posted
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.

Posted
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

  • Recently Browsing   0 members

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