This nearly mostly works!
This commit is contained in:
35
RadarrSeries/boot.ks
Normal file
35
RadarrSeries/boot.ks
Normal file
@@ -0,0 +1,35 @@
|
||||
// Written based off CheersKevin's youtube series
|
||||
// On programming in KOS
|
||||
|
||||
// This script is the boot script for the Radarr
|
||||
// series of surface scanning probes.
|
||||
|
||||
|
||||
// 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, duration, 2, 50, color, false).
|
||||
PRINT message.
|
||||
}
|
||||
|
||||
NOTIFY("Boot sequence complete, prepare to load and compile the flight scripts.").
|
||||
|
||||
IF true { // Set this to false to avoid compiling ascent code.
|
||||
COMPILE "0:/RadarrSeries/radarr_kerbin.ks" TO "1:/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
|
||||
}
|
||||
|
||||
// I changed this!
|
||||
|
||||
NOTIFY("Program compiled and ready to run.").
|
||||
|
||||
IF alt:radar < 100 { // If our radar alt is lower than 10
|
||||
WAIT 5.
|
||||
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