Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Tankdrive10
- @inputs Pod:wirelink CurrentGear
- @outputs On Throttle
- @outputs Clutch
- @outputs RightBrake LeftBrake RightClutch LeftClutch FinalGear
- @persist W R A D S
- @persist
- @trigger none
- interval(100)
- if(dupefinished()){ reset() }
- W=Pod["W",number]
- R=Pod["R",number]
- A=Pod["D",number]
- D=Pod["A",number]
- S=Pod["S",number]
- On=Pod["Active",number]
- Throttle=(W || R || A || D)*100
- LeftBrake = ((D&&!W&&!S)*16 + (D&&W)*(10-CurrentGear/1.2) + S*11 + (!Throttle))*4
- RightBrake = ((A&&!W&&!S)*16 + (A&&W)*(10-CurrentGear/1.2) + S*11 + (!Throttle))*4
- RightClutch=RightBrake>0
- LeftClutch=LeftBrake>0
- Clutch = RightBrake>0 && LeftBrake>0
- FinalGear=1+(R)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement