Skip to content

Instantly share code, notes, and snippets.

@KSAMissionCtrl
Created December 13, 2017 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KSAMissionCtrl/95e86da18d55062bf7909d88e9f6394b to your computer and use it in GitHub Desktop.
Save KSAMissionCtrl/95e86da18d55062bf7909d88e9f6394b to your computer and use it in GitHub Desktop.
Saves the game upon reaching space
when ship:altitude >= 70000 then {
if kuniverse:canquicksave {
// works if the engines are not thrusting
kuniverse:quicksaveto(ship:name).
} else {
// works under any circumstances
kuniverse:quicksave.
// wait for the engines to stop thrusting then saveto
when kuniverse:canquicksave then {
kuniverse:quicksaveto(ship:name).
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment