sinan
03-22-2013, 04:01 PM
Hi First of all so sory for my bad english.
I need some help. I am using VB6 and I couldnt stop planes when it reach 40 degree bank angle.
the code below I use(thanks jims). It works but it zeroise some other values for instance XYZ pos, pedal pos etc. I need just stopt angle of pitch and roll degre when it reach certain degree as a constantly, without changing any other value. Please help me. Thank you
Sub fsx()
SimConnect.AddDataDefinition 1001, "PLANE PITCH DEGREES", "degree", SIMCONNECT_DATATYPE_FLOAT64
SimConnect.AddDataDefinition 1001, "PLANE BANK DEGREES", "degree",
SimConnect.RequestDataOnSimObject 9999, 1001, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SIM_FRAME, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0
End Sub
The code below for setting degree of pitch and roll; I mean If I use code below vibration happend on screen and changes some value between 0 and initial value.
SimConnect.PrepareData 1001, 1
SimConnect.SetDataDouble 0, 0, "pitch angle here what I need"
SimConnect.SetDataDouble 0, 1, "pitch roll angle here what I need"
SimConnect.SetDataOnSimObject SIMCONNECT_OBJECT_ID_USER
and may be there are some different method of limiting bank angle which you help me.
I need some help. I am using VB6 and I couldnt stop planes when it reach 40 degree bank angle.
the code below I use(thanks jims). It works but it zeroise some other values for instance XYZ pos, pedal pos etc. I need just stopt angle of pitch and roll degre when it reach certain degree as a constantly, without changing any other value. Please help me. Thank you
Sub fsx()
SimConnect.AddDataDefinition 1001, "PLANE PITCH DEGREES", "degree", SIMCONNECT_DATATYPE_FLOAT64
SimConnect.AddDataDefinition 1001, "PLANE BANK DEGREES", "degree",
SimConnect.RequestDataOnSimObject 9999, 1001, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SIM_FRAME, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED, 0, 0, 0
End Sub
The code below for setting degree of pitch and roll; I mean If I use code below vibration happend on screen and changes some value between 0 and initial value.
SimConnect.PrepareData 1001, 1
SimConnect.SetDataDouble 0, 0, "pitch angle here what I need"
SimConnect.SetDataDouble 0, 1, "pitch roll angle here what I need"
SimConnect.SetDataOnSimObject SIMCONNECT_OBJECT_ID_USER
and may be there are some different method of limiting bank angle which you help me.