Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- declare waist is 0.
- function playerControl {
- local val is ship:control:pilotroll.
- if val <> 0 {
- set waist:speed to 2 * val * val.
- print waist:speed.
- if val < 0 { waist:moveleft(). } else { waist:moveright(). }
- } else if waist:ismoving {
- waist:stop().
- }
- }
- function startup {
- for s in addons:ir:allservos {
- if s:part:tag = "waist" { set waist to s. }
- }
- set waist:acceleration to 10.
- }
- global start is startup@.
- global pcontrol is playerControl@.
- }
- start().
- until (false) {
- pcontrol().
- wait 0.1.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement