diff --git a/helicopter/init.ks b/helicopter/init.ks index 32d96b6..1f4e948 100644 --- a/helicopter/init.ks +++ b/helicopter/init.ks @@ -1,3 +1,8 @@ +// assumptions about helicopter builds: +// * AG10 toggles the rotor engine power. (with appropriate RPM set by default) +// * AG9 is unmapped. +// * Main throttle controls collective. + runoncepath("lib/control"). global done is false. @@ -16,7 +21,15 @@ set x:AddButton("HOVER"):onClick to { }. set x:AddButton("LAND"):onClick to { - Stabilize(-2). + // todo: consider a more elaborate landing script that adjusts + // velocity as a function of altitude. + when SHIP:STATUS = "LANDED" then { + set done to true. + set SHIP:CONTROL:PILOTMAINTHROTTLE to 0.5. + toggle AG10. + BRAKES on. + } + Stabilize(-5). }.