Advertisement
frytko

loop procedure

May 2nd, 2023 (edited)
656
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function counter { set c to c+1.}
  2. function startup {
  3.     print "procedure 1 -> "+c.
  4.     SET thrott TO 1. LOCK THROTTLE to thrott.
  5.     set x to 7.32602*10^(-9)*ship:altitude^2 - 0.00168158*ship:altitude + 94.6117.
  6.     counter().
  7.     print " end 1 -> "+c.
  8.     wait 2.
  9. }
  10. function start{
  11.     print "procedure 2 -> "+c.
  12.     wait 2.
  13.     SET thrott TO 1. wait .1. stage.
  14.     print "START !!!".
  15.     counter().
  16.     print " end 2 -> "+c.
  17.     wait 2.
  18. }
  19. function test{
  20.     print "procedure 3 -> "+c.
  21. }
  22.  
  23. global done to false.
  24. clearscreen.
  25. global c to 1.
  26. until done {
  27.   when c = 1 then startup().
  28.   when c = 2 then start().
  29.   when c = 3 then test().
  30.   when c > 3 then counter().
  31. when c > 10 then {set done to true.}
  32. }
  33. print "done".
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement