Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A way to control probes in real-time when dealing with RT2 signal delay. Mainly for pointing cameras
// REQUIRED: ActionGroupsExtended mod, which allows action group bindings to circumvent RT2 signal delay
// Can change action groups to whatever works for you, I use AGX to assign them to Numpad keys
set running to true.
set locked to true.
// exit the program
on AG8 { set running to false. }.
// kill rotation
on AG1 {
set ship:control:neutralize to true.
lock steering to ship:facing.
set locked to true.
preserve.
}.
// pitch up
on AG2 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:pitch to -0.25.
preserve.
}.
// pitch down
on AG3 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:pitch to 0.25.
preserve.
}.
// roll left
on AG4 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:roll to -0.25.
preserve.
}.
// roll right
on AG5 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:roll to 0.25.
preserve.
}.
// yaw left
on AG6 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:yaw to -0.25.
preserve.
}.
// yaw right
on AG7 {
if locked {
set locked to false.
unlock steering.
}
set ship:control:yaw to 0.25.
preserve.
}.
// initialize
clearscreen.
print "Local control enabled".
lock steering to ship:facing.
// program loop
until not running {
wait 0.01.
}.
// reset controls
unlock steering.
set ship:control:neutralize to true.
print "Local control terminated".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.