Closed Feinbube closed 8 years ago
the two steering systems are very separate in the code and this was by design. because much of the steering code is slated for a rewrite i have just been hoping no one noticed ;) Sorry if this is causing you trouble
Thank you for your report!
Even after implementing the new steering, it still makes sense ( at least to me ) to have both.
I just wanted to comment that during the most recent revision to steering (included with release v0.20.1) I modified the behavior of the "throttle" getter, so that if lock throttle
is not engaged, set t to throttle.
will instead set the value to the "current" control state. This will lag one tick behind the values of ship:control
but should be close enough to serve your original purpose @Feinbube.
I want to make sure that this is clear, because it's important: throttle
will only return the value of ship:control:mainthrottle
if you never called lock throttle
or if unlock throttle
was called. Because the two variables reside in very different places and serve very different functions, it is not really possible to decouple the value of throttle
. This may become possible as we move other steering controls to the new kOSVesselModule
model. At the very least we should find a way to detect potential conflicts (since you can technically enable both mainthrottle
and lock throttle
and not receive an error).
kOS Operating System KerboScript v0.17.2
Proceed. lock throttle to 1. // in game throttle goes up. print throttle + " / " + ship:control:mainthrottle. 1 / 0
lock throttle to 0. // in game throttle goes down. print throttle + " / " + ship:control:mainthrottle. 0 / 0
set ship:control:mainthrottle to 1. // in game throttle goes up. print throttle + " / " + ship:control:mainthrottle. 0 / 1