This is a lot of code that "should" work.
This commit is contained in:
@@ -4,22 +4,36 @@
|
||||
// This script is the boot script for the Radarr
|
||||
// series of surface scanning probes.
|
||||
|
||||
// This section from latest docs.
|
||||
wait until ship:unpacked.
|
||||
clearscreen.
|
||||
|
||||
// This method prints in big letters something on the screen.
|
||||
FUNCTION NOTIFY {
|
||||
PARAMETER message.
|
||||
PARAMETER duration IS 5.
|
||||
PARAMETER color IS WHITE.
|
||||
|
||||
HUDTEXT("kOS: " + message, 5, 2, 50, WHITE, false).
|
||||
PRINT message.
|
||||
}
|
||||
|
||||
NOTIFY("Program booted!").
|
||||
// This section from latest docs.
|
||||
wait until ship:unpacked.
|
||||
clearscreen.
|
||||
|
||||
NOTIFY("Boot sequence complete, prepare to load and compile the flight scripts.").
|
||||
|
||||
IF true { // Set this to false to avoid compiling ascent code.
|
||||
SWITCH TO 0.
|
||||
COPYPATH("0:/RadarrSeries/radarr.kerbin.ks", ""). // Copy over our launch script from the archive at ksc
|
||||
COMPILE "radarr.kerbin.ks" to "ascent.ksm". // Compile the flight code into a ksm object.
|
||||
} ELSE {
|
||||
COPYPATH("0:/RadarrSeries/radarr.kerbin.ks", "1:/ascent.ks"). // Copy over our launch script from the archive at ksc
|
||||
}
|
||||
|
||||
NOTIFY("Program compiled and ready to run.").
|
||||
|
||||
IF ALT:RADAR < 100 { // If our radar alt is lower than 10
|
||||
WAIT 5.
|
||||
COPY radarr.kerbin.ks FROM 0. // Copy in a prototyping script
|
||||
RUN radarr.kerbin.ks. // Run the script we coppied over
|
||||
run ascent.ks. // Run the ascent stage!
|
||||
} else {
|
||||
NOTIFY("System booted but did not pass pre-flight checks, aborting excecution!").
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user