Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- clearscreen.
- function launch {
- lock throttle to 1.
- wait until altitude > 1000.
- stage.
- wait until apoapsis > 70000.
- lock throttle to 0.
- wait until periapsis > 70000.
- lock steering to prograde.
- lock throttle to 1.
- }
- function launchSequence {
- print "Launch sequence initiated."
- wait until altitude > 500.
- stage.
- print "Engines ignited. Liftoff!"
- wait until altitude > 10000.
- print "Gravity turn started."
- lock steering to heading(90, 90).
- launch.
- print "Circular orbit achieved."
- }
- set runLaunch to false.
- function handleCommand {
- parameter command.
- if command = "launch" {
- if not runLaunch {
- runLaunch = true.
- print "Received launch command. Starting launch sequence."
- launchSequence.
- runLaunch = false.
- print "Launch process completed."
- } else {
- print "An error occurred. Launch process is already running."
- }
- } else {
- print "Unknown command. Please send a valid command."
- }
- }
- until false {
- wait 0.01.
- if ship:control:pilotinput:hascommand {
- handleCommand(ship:control:pilotinput:getcommand).
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement