Jump to content

Recommended Posts

Posted (edited)

I have a specific monitor config for the Apache because I amusing the Total Controls frames. However, I also use them for all the other aircraft that use smaller displays with only 5 buttons. So I want the monitor config to  be different depending on which airframe is chosen. My monitor config file is below:

 

--3840 x 3184       3840x2160 LG B2 OLED screen with 768x1024 screens below
_  = function(p) return p; end;
name = _('Camera + 2 MFCDsBelow');
Description = '2 MFCDs on the right and camera on the top'
Viewports =
{
     Center =
     {
          x = 0;
          y = 0;
          width  = 3840;
          height = 2160;
          viewDx = 0;
          viewDy = 0;
          aspect = 3840 / 2160;
     }
}


 if unit_type == "AH-64D_BLK_II" then
          
          --Viewports  = ... define new Viewports table 
          -- also you can define cockpit displays viewports here 
          LEFT_MFCD =
          {
               x = 0;
               y = 2160+120;
               width = 768;
               height = 768;

          }
          RIGHT_MFCD =
          {
               x = 768;
               y = 2160+120;
               width = 768;
               height = 768;
          }

     else 
          LEFT_MFCD =
          {
               x = 10;
               y = 2160+140;
               width = 663;
               height = 663;

          }
          RIGHT_MFCD =
          {
               x = 768+10;
               y = 2160+140;
               width = 663;
               height = 663;
          }
          

     end


GUI = 
{
      x = 0;
      y = 0;
      width = 3840;
      height = 2160;
}

UIMainView = GUI
GU_MAIN_VIEWPORT = Viewports.Center

The problem is that the montior config is ALWAYS what comes after the 'else'

I figured that I am referencing the Apache wrongly and also tried 

"AH-64D BLK.II"

as well as

"AH-64D"

 

but no, DCS is not cooperating. Has anyone successfully specified an Apache multimonitor config?

SOLUTION:

The if then statement has to enclosed by a function. Like so:

 

function  reconfigure_for_unit(unit_type)   --unit type is string with unit name
if

...

else

...

end

end

Edited by skypickle
  • Like 1

4930K @ 4.5, 32g ram, TitanPascal

  • skypickle changed the title to Having trouble specifying a monitor config for the Apache [SOLVED]
  • Recently Browsing   0 members

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