Advertisement
Kyace

hover1.ks

Aug 3rd, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. LOCK alt TO SHIP:ALTITUDE.
  2. LOCK vertspd to SHIP:VERTICALSPEED.
  3. SET level to 100.
  4. LOCK delta to ABS(level - alt/10).
  5.  
  6. LOCK steering TO UP.
  7.  
  8. SET thrott to 1.
  9. SET min to 0.
  10. SET max to 1.
  11. LOCK THROTTLE to thrott.
  12. WAIT 1.
  13. STAGE.
  14.  
  15. UNTIL SHIP:LIQUIDFUEL < 0.001 {
  16. if (alt+2*vertspd) < (level) {
  17. SET thrott to thrott + delta.
  18. if thrott > max {set thrott to max.}
  19. }else if (alt+2*vertspd) > (level+1){
  20. SET thrott to thrott - delta.
  21. if thrott < min {set thrott to min.}
  22. }
  23. WAIT 0.01.
  24. }
  25.  
  26.  
  27. PRINT "Deploying parachutes.".
  28. STAGE.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement