mirror of https://github.com/dirtbags/moth.git
37 lines
618 B
Plaintext
37 lines
618 B
Plaintext
|
|
|
|
0 set-turret!
|
|
|
|
100 98 set-speed! ( Go in circles )
|
|
0 sensor? { fire! } if ( Fire if turret sensor triggered )
|
|
|
|
|
|
9 sensor? { -70 -70 set-speed! } if ( Turn if collision sensor triggered )
|
|
0 sensor? { 1 set-led! } if
|
|
|
|
|
|
5 sensor? {get-turret set-turret! } if
|
|
5 sensor? {80 80 set-speed! } if
|
|
6 sensor? {20 -20 set-speed!} if
|
|
7 sensor? {-20 20 set-speed!} if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 sensor? { get-turret 6 - set-turret! } if
|
|
2 sensor? { get-turret 1 - set-turret! } if
|
|
|
|
1 sensor? { get-turret 1 + set-turret! } if
|
|
3 sensor? { get-turret 6 + set-turret! } if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|