mirror of https://github.com/dirtbags/moth.git
14 lines
806 B
Plaintext
14 lines
806 B
Plaintext
|
0 set-turret! ( Rotate turret )
|
||
|
60 58 set-speed! ( Full speed! )
|
||
|
0 sensor? { fire! } if ( Fire if turret sensor triggered )
|
||
|
1 sensor? { 100 -150 set-speed! } if ( Turn if right sensor triggered )
|
||
|
2 sensor? { -150 100 set-speed! } if ( Turn if left sensor triggered )
|
||
|
8 sensor? { 90 0 set-speed! } if ( Turn if right/front sensor triggered )
|
||
|
9 sensor? { 0 90 set-speed! } if ( Turn if left/front sensor triggered )
|
||
|
3 sensor? { 150 150 set-speed! } if (Front doublespeed)
|
||
|
4 sensor? { 150 150 set-speed! } if ( run away! )
|
||
|
|
||
|
7 sensor? { -150 -150 set-speed! } if (Front collision)
|
||
|
|
||
|
fire-ready? {}{ 5 sensor? {-30 -60 set-speed! } if } ifelse
|
||
|
fire-ready? {}{ 6 sensor? {-60 -30 set-speed! } if } ifelse
|