I'm no expert but perhaps you need the delay.
vi:create_controlsurface(AIRCTRL.ELEVATOR, 7, 0.7, {x=0, y=0, z=-17}, AIRCTRL_AXIS.XPOS, 0.5, anim_elevator)
I reported, a while ago, that I couldn't control a vessel class written in Lua with the numpad. RCS was fine just no control surfaces.
I just compiled a vessel class (a .so) and I have the same problem. No control surfaces with the numpad. Joystick is fine and stock vessels are fine.
Any...
Yes the vessel class is written in Lua.
I believe the methods for saving to a scenario are not implemented.
After some thought I realize my initial question is moot anyway.
Lua vessel classes don't have "consumebufferedkey" so I'm retracting and extending the gear via altitude not keystroke.
It...
This is a vessel that I created.
Sometimes I'd like to start a scenario with the gear up and sometimes down.
Lua vessels don't currently save their animation states between saving and loading(at least I don't know how to do it).
I was hoping I could manually edit a scenario to do what I want...
The makepkg doesn't install anything, pacman does. Just don't run pacman after you build the package. Instead copy the relevant package files to whatever orbiter directory.
This seems to do it and ties rpm to thrust.
--configuration part
anim_Prop = vi:create_animation(0)
Prop1 = {
type = 'rotation',
mesh = 0,
grp = 13,
ref = {x=0,y=0.467,z=8.928},
axis = {x=0,y=0,z=1},
angle = -360*RAD
}
animcomp_Prop =...
Thanks for answering but your talking past me a bit. I assumed the angle would increase the correct amount so the animation would finish at 1. (or where I set it )
I'd like to animate a prop in a Lua vessel.
I can set the animation like this:
pwr = vi:get_animation(anim_Prop)
da = simdt * 0.1
pwr_proc = pwr + da
gas = vi:get_thrusterlevel(thmain)
if
gas > 0
then
vi:set_animation(anim_Prop,pwr_proc)
end
but I don't know how to repeat...
Thanks again.
This is working code though it seems peculiar.
function clbk_poststep(simt,simdt,mjd)
alt = vi:get_altitude()
lgr = vi:get_animation(anim1)
da = simdt * 1
lgr_proc1 = lgr - da
lgr_proc2 = lgr + da
if lgr > 0 and alt > 250
then...
Hello, I'm animating the landing gear in a Lua vessel like this:
function clbk_poststep(simt,simdt,mjd)
alt = vi:get_altitude()
lgr = vi:get_animation(anim1)
if lgr == 1 and alt > 250
then
vi:set_animation(anim1,0)
end
if lgr == 0 and alt < 200
then...