So I'm back (at least temporarily) after a long hiatus. Looks like times have been good in my absence. Orbiter 2010 is awesome.:tiphat:
I've been playing with Lua a bit, because I want to experiment with writing autopilots, but I don't want to deal with c++. Unfortunately I've been having trouble selecting any thruster groups except the main engines. I've written a little testing MFD that does this:
This should allow me to work out the correspondence between numbers and thrusters, by changing thgrp and then firing various engines. However, I've tested this in the stock DG, the Shuttle-A, and the Shuttle-PB, and all of the numbers (positive and negative (and I'm surprised negative numbers don't crash it)) seem to correspond to the main engines. The only exception I've found so far is that in the Shuttle-A, 0 is the aux engines. What's going on here? Am I doing it wrong? Is the Lua api incomplete or buggy? If it would help, I can post the source for my testing MFD. It's not too long.
Thanks!
I've been playing with Lua a bit, because I want to experiment with writing autopilots, but I don't want to deal with c++. Unfortunately I've been having trouble selecting any thruster groups except the main engines. I've written a little testing MFD that does this:
Code:
-- vi is the focused vessel (result of calling vessel.get_focusinterface())
-- thgrp is a user specified integer, which selects a thruster group
thrust = vi:get_thrustergrouplevel(vi:get_thrustergrouphandlebyindex(thgrp))
-- now write the value of thrust to the MFD display
This should allow me to work out the correspondence between numbers and thrusters, by changing thgrp and then firing various engines. However, I've tested this in the stock DG, the Shuttle-A, and the Shuttle-PB, and all of the numbers (positive and negative (and I'm surprised negative numbers don't crash it)) seem to correspond to the main engines. The only exception I've found so far is that in the Shuttle-A, 0 is the aux engines. What's going on here? Am I doing it wrong? Is the Lua api incomplete or buggy? If it would help, I can post the source for my testing MFD. It's not too long.
Thanks!