Search results

  1. Thunder Chicken

    LUA Keypress Detection for Lua Script Vessels?

    I am trying to transition my Lua script vessel addons to OpenOrbiter, and it seems that the procedure to implement keypress detection in Lua (using recently developed keystate.dll discussed here) has changed. Is there a means to manage vessel keypress events within the Lua interpreter now?
  2. Thunder Chicken

    General Question Way to Identify Orbiter Version from within Add-ons (C++ or Lua)?

    Is there any way to determine under what version of Orbiter (Orbiter 2010, Orbiter 2016, OpenOrbiter, etc..) an add-on has been installed? What I mean is, if I write a Lua script or a C++ module, and certain features will only work with certain versions of Orbiter, that I can get the version...
  3. Thunder Chicken

    Project Autopilot ScriptMFD by Thunder Chicken

    Hello all, This is an initial beta release of my ScriptMFD Autopilot suite. It was developed under Orbiter 2016 on Linux. If folks could give it a try with their different vessels and OS and give me their feedback it would be much appreciated. If I can get it polished up enough I'll release it...
  4. Thunder Chicken

    The Future of Lua with Orbiter? Is it at a Dead-End?

    While I have been in the Orbiter community since the M6 days, and Lua scripting has been a feature since at least Orbiter 2010 if not earlier, I've only recently started tinkering with it in Orbiter 2016 within the last year to make add-ons as it is easier to work than trying to setup C++ on a...
  5. Thunder Chicken

    Question Sorting City Waypoints by Name Not Working?

    More Lua adventures. So I have a waypoint autopilot that takes lat/long data from the Orbiter Cities.mkr file and converts it to a table of tables that is searchable by index, so the user can scroll through the cities and select the desired waypoint. The resulting table has a number of tables...
  6. Thunder Chicken

    News RIP SpaceX B1058

    The SpaceX Falcon 9 reflight leader B1058 has met its end after its 19th landing. Apparently landed fine, but tipped over on the landing barge in rough seas. :salute:
  7. Thunder Chicken

    Question Way to Access Base and City Markers in MFD Script

    I am looking for a way to get base and city lat/long data into an script MFD waypoint autopilot like what is available to the stock Map MFD function. I am not seeing a ready way to access this information through the API. I am aware the marker files are available in Orbiter...
  8. Thunder Chicken

    Problem Script crashes when attempting to access navaid table element in Lua?

    So I am trying to make an autopilot feature that will navigate to VOR stations. I have the following Lua code that pulls the table for the transmitter in the vessel NAV1 receiver. hnav = vi:get_navsource(0) nav_table = oapi.get_navdata(hnav) I can print this table out to the screen...
  9. Thunder Chicken

    Question Making Valid Sketchpad object in Lua?

    I am trying to draw text and rectangles on the main camera view from the cockpit using Sketchpad objects. In the Help Lua documentation there is this statement: In the following, skp is assumed to refer to a valid Sketchpad object. But I have not seen how to make a "valid Sketchpad object" in...
  10. Thunder Chicken

    Question Writing vessel parameters to scenario file in Lua?

    Do equivalents to oapiReadScenario_nextline(scn, line) and oapiWriteScenario_int(scn, "status", status) and scenario callback functions exist for Lua in Orbiter 2016 to read and write animation and vessel status and states to the scenario file? I tried "Lua-fying" the Orbiter API equivalents...
  11. Thunder Chicken

    Question Implementing DG-Like Landing Gear Indicators in Lua?

    Yep, me again. I have my jet engine code completely converted into Lua, and I have annotations that indicate the status of the afterburner on the screen. The final thing I want to implement is to replicate the landing gear indicators like is done in the DG. I can put text annotations into the...
  12. Thunder Chicken

    Question THGROUP_USER / THGROUP.USER Identifier in Lua?

    Hi, me again :) I wanted to verify if the THGROUP_USER identifier was ported to Lua or not. It is not shown in the listing of thruster group identifiers in the Help pages: My jet engine code requires a user-defined thruster group, so if it doesn't exist I'll have to cobble something else...
  13. Thunder Chicken

    Question ShiftCG or ShiftCentreofMass in Lua?

    Is there a ShiftCG or ShiftCentreofMass capability in Lua? I saw a link to Shift_CentreofMass in the Help files but it doesn't link to anything. EDIT: Below is an image that shows where these are found in the Orbiter Help dialogue, under Orbiter Scripting / Class Methods / Vessel Methods. The...
  14. Thunder Chicken

    Question [SOLVED] Importing Lua Module?

    More Lua questions :( I am trying to clean up my vessel script by moving the animations to a separate module file. I am basically following the format shown here: https://copyprogramming.com/howto/in-lua-how-do-you-import-modules This is my module file make_anim.lua (in same directory as the...
  15. Thunder Chicken

    Question Implementing Parent / Child Animations in Lua?

    I am trying to establish an animation of a rotating wheel on a landing gear strut. I have an animation of the wheel that causes it to rotate about its axle when the vessel is rolling, defined as follows: anim_wheel1 = vi:create_animation(0) wheel1 = { type = 'rotation', mesh =...
  16. Thunder Chicken

    Question Key press events in Lua vessel script?

    I am trying to figure out how to implement key presses inside a vessel script. In particular, I'd like to trigger a landing gear animation by hitting the 'G' key. In Lua there does not seem to be a callback function for this. There is a v:send_bufferedkey(keycode) method, but I am not quite...
  17. Thunder Chicken

    Question [SOLVED] Flight Control Animations Not Working In Lua

    I am trying to convert some of my C++ add-on modules into Lua scripts. One problem I am having is getting the flight control animations to work. For example, here is the elevator implementation In clbk_setclasscaps(cfg): vi:create_controlsurface(AIRCTRL.ELEVATOR, 7, 0.7, {x=0, y=0, z=-17}...
  18. Thunder Chicken

    Question [SOLVED] oapi.get_airspeedvector(vi, REFFRAME.LOCAL) returning type nil?

    I am trying to create a simple airspeed hold autopilot using a Lua MFD script. To do this, I am trying to get the airspeed vector so I can extract the forward velocity as my control target. This is how I am trying to do it: airspeed_vector = oapi.get_airspeedvector(vi, REFFRAME.LOCAL) The...
  19. Thunder Chicken

    Surface Base Earth Base Airport Addons for Orbiter 2016?

    I'm looking to populate Earth, particularly Europe and North America, with bases. Are there any base add-ons compatible with Orbiter 2016 that installs a lot of real airports in these regions? Basically just something with nearly correct runways at minimum would be fine.
  20. Thunder Chicken

    API Question SetControlSurfaceLevel "Permanent" and "Transient" Behavior?

    I have been working on a basic autopilot for Kev33's Mirage 2000 that I have been tinkering with for a while. It seems to work, but it seems to "stick" even when I shut the autopilot off. As an example, here is the part of the autopilot that holds the wings level: if (autopilot_status == 1)...
Top