If GetVariable("COG_X") < 176 Then SetVariable "SERVO_VALUE_1", Cint((GetVariable("SERVO_VALUE_1") - ((176-GetVariable("COG_X"))/15) )) ElseIf GetVariable("COG_X") > 176 Then SetVariable "SERVO_VALUE_1", Cint((GetVariable("SERVO_VALUE_1") + ((GetVariable("COG_X")-176)/15) )) End If If GetVariable("COG_Y") < 144 Then SetVariable "SERVO_VALUE_2", Cint((GetVariable("SERVO_VALUE_2") - ((144-GetVariable("COG_Y"))/15) )) ElseIf GetVariable("COG_Y") > 144 Then SetVariable "SERVO_VALUE_2", Cint((GetVariable("SERVO_VALUE_2") + ((GetVariable("COG_Y")-144)/15) )) End If If GetVariable("SERVO_VALUE_1") < 10 Then SetVariable "SERVO_VALUE_1", 250 ElseIf 250 < GetVariable("SERVO_VALUE_1") Then SetVariable "SERVO_VALUE_1", 10 End If If GetVariable("SERVO_VALUE_2") < 10 Then SetVariable "SERVO_VALUE_2", 250 ElseIf 250 < GetVariable("SERVO_VALUE_2") Then SetVariable "SERVO_VALUE_2", 10 End If SetVariable "CENTER_DISTANCE_X", Cint((GetVariable("COG_X") - 176 )) SetVariable "CENTER_DISTANCE_Y", Cint((GetVariable("COG_Y") - 144 ))