CougarFFW04 Posted December 22, 2019 Posted December 22, 2019 Hi everyone, I am pretty sure that I already asked this question and that the answer was "no" but I can't find it anymore. So the question is : when you create a group in the mission editor there is a field labeled "task" that can be for exemple "AWACS", "ESCORT" or whatever. Is there any scripting function that allows to get this field for a particular group ? I didn't find any DCS function that would do it. Thanks
R-22 Posted December 22, 2019 Posted December 22, 2019 Task Only applies to the Unit you selected. Depending on the Bird you selected the Tasks are limited to the Air-frame. An A10's Task cannot be AWACS. What specifically are you trying to do?
CougarFFW04 Posted December 22, 2019 Author Posted December 22, 2019 Hi R22, Task Only applies to the Unit you selected. Depending on the Bird you selected the Tasks are limited to the Air-frame. An A10's Task cannot be AWACS. What specifically are you trying to do? AWACS was just a particular exemple... Tryning to explain better. Let's suppose that in the mission editor (ME) I spawn an E3 (let's call it SQN01 in the mission editor name field) to which the task label in the ME is selected as "AWACS" (obviously). Knowing the name (SQN01) I would like a scripting function thyat would allow to get the content of the ME field task (here "AWACS")
Hardcard Posted December 23, 2019 Posted December 23, 2019 (edited) @CougarFFW04 This is one of those things that should be easy to get... but it's a pita instead. The only way I know to do this is by accessing the group template table from the database. I do this using MOOSE in the following way (required field marked in red, don't remove quotation marks): local Group_Template_Table = _DATABASE:GetGroupTemplateFromUnitName("[color="Red"]name of the relevant unit in ME[/color]") local Template_Task = Group_Template_Table.task [color="Blue"]-- This should return a string containing the name of the task assigned to the group in ME[/color] Edited December 23, 2019 by Hardcard [sIGPIC][/sIGPIC]
CougarFFW04 Posted December 23, 2019 Author Posted December 23, 2019 Thank Hardcard, Too bad that there is no simple DCS function to do it.
Recommended Posts