Advertisement
blorgon

Single-Line Hoverslam Script

Jul 1st, 2016
1,966
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //created by /u/supreme_blorgon (blorgon on KSP forum).
  2.  
  3. wait until verticalspeed < 0.
  4. lock steering to srfretrograde.
  5. set throt to 0.
  6. lock throttle to throt.
  7. //the '0.635' down there in the throttle function should be bigger the lower your TWR is. 0.635 works for any TWR > 2, so I'm thinking of adding a small function that adjusts that value if your TWR is < 2, but it's not really a priority for me since my propulsive landers always have higher TWRs than that (and I use parachutes when possible).
  8. until (altitude - geoposition:terrainheight) < 2 {
  9.     set throt to min(1,max(0,(((0.635/(1+constant:e^(5-1.5*(altitude-geoposition:terrainheight))))+((altitude-geoposition:terrainheight)/min(-1,(verticalspeed))))+(abs(verticalspeed)/(availablethrust/mass))))).
  10.     wait 0.
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement