July 20, 20223 yr I wrote a FlyWithLUA script long ago that would set the heading bug using code similar to below .... ------------------------------------------ dataref("gPlaneAPHeading", "sim/cockpit/autopilot/heading", "writable") -- defined earlier on in the script gPlaneAPHeading = 90 -- set the AutoPilot heading ------------------------------------------ but, with no change to the code this no longer works, yet I can set the dataref via the dataref editor plugin. Does anyone have a suggestion of what I need to change to get this working again? It appears to no longer be writable My searches have turned up nothing. Thanks. Edited July 20, 20223 yr by smoothchat Specs: Win10, 4790K, nVidia 1080ti, Saitek Yoke+Quadrant+Radio/Switch and AP panels, VRInsight 737 overhead, Virtual Avionics 737 MCP. 3 x 1440*900 main display + 1024*600 VDU display. NLR V3 Motion seat. Oculus DK2 CV1 HTC Vive VR headsets.
July 20, 20223 yr If that's all there is to your script, it will just set the heading bug to 90 upon sim session start and nothing more anyway. Just about any other script or plugin being run after your script finishes can override the bug position. 7950X3D + 7900 XT + 64 GB + Linux | 4800H + RTX2060 + 32 GB + Linux My add-ons from my FS9/FSX days
July 21, 20223 yr Author Hehe, Thanks Bjoern, It's just a couple of lines from the Formation script which I published on the X-Plane forum. Thank you for prompting my memory. I have discovered that I had since enabled another script which conflicts with mine. FYI My script is here ..... https://forums.x-plane.org/index.php?/files/file/50534-formation-flying-flywithlua-script-update-see-notes/ When I acquire the AI planes and create a formation so I can fly my plane with them (as a wingman), I push the 1st AI plane's heading into my plane's autopilot heading so it will turn and fly the same heading as the formation (which is led by the 1st AI plane). Example of what happens. The aircraft heading changes to match the AI plane. cheers Edited July 21, 20223 yr by smoothchat Specs: Win10, 4790K, nVidia 1080ti, Saitek Yoke+Quadrant+Radio/Switch and AP panels, VRInsight 737 overhead, Virtual Avionics 737 MCP. 3 x 1440*900 main display + 1024*600 VDU display. NLR V3 Motion seat. Oculus DK2 CV1 HTC Vive VR headsets.
July 21, 20223 yr 5 hours ago, smoothchat said: Hehe, Thanks Bjoern, It's just a couple of lines from the Formation script which I published on the X-Plane forum. Thank you for prompting my memory. I have discovered that I had since enabled another script which conflicts with mine. Solutions can sometimes be so very simple... 😅 7950X3D + 7900 XT + 64 GB + Linux | 4800H + RTX2060 + 32 GB + Linux My add-ons from my FS9/FSX days
July 28, 20223 yr slightly different direction, but if you want to do this with voice commands ala the lua that does it is here https://github.com/mSparks43/747-400/blob/cbd28b13cbf8a0f67b9c2daaec0e48b5ed3ac231/plugins/xtlua/scripts/B747.70.xt.autopilot/B747.70.xt.autopilot.lua#L2712 and the json definition for the voice command is {"recognise":"set heading","commandArray":[{"command":"laminar/B747/autopilot/heading/target=?","pause":0.2}]} in https://github.com/mSparks43/747-400/blob/2.3/plugins/AutoATC/voice commands/voice_control.json AutoATC Developer
Archived
This topic is now archived and is closed to further replies.