Author Topic: Problem with Doors  (Read 2465 times)

Jerrymc3

  • Full Member
  • ***
  • Posts: 143
  • My B737-800 Cockpit
Problem with Doors
« on: November 24, 2018, 02:47:44 am »
I have GSXv2.  When I request boarding, even after opening Doors 1 & 2 I keep getting the beeping sound and the green text line telling me to open Exits 1 & 2.  I try opening all of the doors (Tab + 1-6) but I'm still getting the same message.  Incidentally, I'm using the Prosim737v2 aircraft.

Jerry
MSFS2020 PROSIM738
Gigabyte Z390 Aorus Pro WiFi MB
Intel Core i9-9900K 3.6 GHz
EVGA CLC 240 Liquid / Water CPU Cooler
CORSAIR Vengeance LPX 32GB (2 x 16GB)
Gigabyte RTX 3090 TI 24GB
OC EFIS,MCP,FWD/AFT Ovhd,COM,NAV,ADF,XPND

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50710
    • VIRTUALI Sagl
Re: Problem with Doors
« Reply #1 on: November 26, 2018, 12:39:41 am »
Incidentally, I'm using the Prosim737v2 aircraft.

When you use an airplane which is not already supported by GSX internally, you MUST create a proper GSX configuration for it, including specifying which variables controls which door.

This is all explained on the GSX manual, Pages 46-47

Jerrymc3

  • Full Member
  • ***
  • Posts: 143
  • My B737-800 Cockpit
Re: Problem with Doors
« Reply #2 on: November 27, 2018, 02:02:16 am »
I read the information in the manual but the Prosim737 doesn't seem to have an mdl file.  It uses a lua script to control the doors located in the C:\Users\JERRYMC3\Documents\Prepar3D v4 Add-ons\ProSim-AR\Simobjects\Airplanes\ProSim737-800-2018 Professional\ folder.  This is the part of the script for the Forward Left Exit door.

------------------------
-- ProSim doors
------------------------
doorflag0=0
doorflag1=0
doorflag2=0
doorflag3=0
doorflag4=0
doorflag5=0
doorflag6=0
ground=ipc.readUW(0x0366)
sound.path(os.getenv("userprofile") .. "\\documents\\prepar3d v4 add-ons\\prosim-ar\\sound\\")

function FWD_Left_Door()
   if (doorflag0 == 0) and (ground == 1) then
            ref=sound.play("door_open.wav", 0,30,270)
      n = 1
         while n <= 200 do
            ipc.writeLvar("L:738_door_0", n)
            n = n+1
         end
            doorflag0=1
   else
   if (doorflag0 == 1) and (ground == 1) then
            ref=sound.play("door_close.wav", 0,40,270)
      n = 199
         while n >= 0 do
            ipc.writeLvar("L:738_door_0", n)
            n = n-1
         end
            doorflag0=0
   end
  end
end
event.key(49,16,1, "FWD_Left_Door") -- tab+1

--

I tried putting (L:doorflag0, bool) in the Custom Check box but that didn't stop GSX from requesting me to open the door.  I don't know if this is the wrong variable or if GSX isn't finding it because its not in an xml file.  The only way I could get it to work is by choosing
Door Without Open/Close Checks.
 
MSFS2020 PROSIM738
Gigabyte Z390 Aorus Pro WiFi MB
Intel Core i9-9900K 3.6 GHz
EVGA CLC 240 Liquid / Water CPU Cooler
CORSAIR Vengeance LPX 32GB (2 x 16GB)
Gigabyte RTX 3090 TI 24GB
OC EFIS,MCP,FWD/AFT Ovhd,COM,NAV,ADF,XPND

c912039

  • Newbie
  • *
  • Posts: 15
Re: Problem with Doors
« Reply #3 on: November 27, 2018, 02:46:22 am »
Try using

L:738_door_0

virtuali

  • Administrator
  • Hero Member
  • *****
  • Posts: 50710
    • VIRTUALI Sagl
Re: Problem with Doors
« Reply #4 on: November 27, 2018, 11:06:25 am »
I tried putting (L:doorflag0, bool) in the Custom Check box but that didn't stop GSX from requesting me to open the door.  I don't know if this is the wrong variable or if GSX isn't finding it because its not in an xml file.

That's not the correct variable, and no program can read it, because it's an internal variable defined by the LUA script, so it's accessible only within the context of that script.

The variable visible through the simulator, so they are accessible to all applications, including GSX, are those written using the ipc.writeLvar, commonly named L: variables, which are also referenced as such in the GSX documentation at page 47:

Quote
Custom Check - This is the XML Expression that can be used to read the door’s status, which might involve custom L: Variables

In Linda scripts, L: variables are written using the ipc.writeLvar command so, in your case, the correct XML expression to check their status in GSX would be:

(L:738_door_0, bool)
« Last Edit: November 27, 2018, 11:08:44 am by virtuali »

Jerrymc3

  • Full Member
  • ***
  • Posts: 143
  • My B737-800 Cockpit
Re: Problem with Doors
« Reply #5 on: November 27, 2018, 09:10:53 pm »
Quote
In Linda scripts, L: variables are written using the ipc.writeLvar command so, in your case, the correct XML expression to check their status in GSX would be:

(L:738_door_0, bool)

Thanks Umberto, that worked

Jerry
MSFS2020 PROSIM738
Gigabyte Z390 Aorus Pro WiFi MB
Intel Core i9-9900K 3.6 GHz
EVGA CLC 240 Liquid / Water CPU Cooler
CORSAIR Vengeance LPX 32GB (2 x 16GB)
Gigabyte RTX 3090 TI 24GB
OC EFIS,MCP,FWD/AFT Ovhd,COM,NAV,ADF,XPND