-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathleg_level.ks
More file actions
31 lines (26 loc) · 748 Bytes
/
leg_level.ks
File metadata and controls
31 lines (26 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
copypath("0:/lib/leg_level.ks","1:/lib/leg_level.ks").
run once "/lib/leg_level".
// test the lib.
local leg_data is leg_level_init("Leg [0-9]*", "LegLaser [0-9]*").
until false {
clearscreen.
print "LEG LEVELER PAUSED. Type any key to resume, (Q) to quit..".
set ag8 to false.
wait until terminal:input:haschar().
if terminal:input:getchar() = "q"
break.
clearscreen.
print "LEG LEVELER RESUMING. Type any key to pause, (Q) to quit..".
leg_level_start(leg_data).
until terminal:input:haschar() {
if leg_level_update(leg_data)
break.
wait 0. // No need to move it too fast.
}
if terminal:input:getchar() = "q"
break.
leg_level_stop(leg_data).
wait 0.
}
leg_level_stop(leg_data).
print "DONE.".