FSDreamTeam forum

Products Support => GSX Support FSX/P3D => Topic started by: Jerrymc3 on November 24, 2018, 02:47:44 am

Title: Problem with Doors
Post by: Jerrymc3 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
Title: Re: Problem with Doors
Post by: virtuali 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
Title: Re: Problem with Doors
Post by: Jerrymc3 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.
 
Title: Re: Problem with Doors
Post by: c912039 on November 27, 2018, 02:46:22 am
Try using

L:738_door_0
Title: Re: Problem with Doors
Post by: virtuali 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)
Title: Re: Problem with Doors
Post by: Jerrymc3 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