Using Titan 1 script on Titan 2

Titan Two general support. Questions, firmware update, feature request.

Re: script conversion

Postby DontAtMe » Tue Oct 22, 2019 4:49 am

Code: Select all
 
// Converted to GPC2
//v1.2.T2.custom
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
 
//Posted : Wednesday 19th of June, 2019 23:01 UTC 
 
 
 
/* The Golf Club 2019
 
 
v1.2
Added X_VARIANCE.  Maximum amount X axis will vary (+-)
 
 
 
v1.1
Chip - LT/L2 + A/Cross
Swing Strenth - Hold A/Cross then Up/Down (+- 5 each tap) TRACE_4 shows max backswing value
------------------------------------------------------------------------------------------
v1.0
***IF YOU USE LEFT STICK TO SWING SET SWING_STICK = LEFT;***
 
To use Random Delay Times at Top of The Swing set RANDOM_DELAY_TOP = TRUE
 
Full Swing - HOLD LT/L2 then tap RT/R2
 
Smooth Follow Through on Putt - Pull swing stick back untill putter head is at desired location then tap
either LT/L2 or RT/R2
 
*/

 
#include <xb1.gph>                                                         
#define RIGHT  XB1_RY
#define LEFT   XB1_LY
 
 
//--Change to LEFT for Left Stick Swing
#define SWING_STICK  LEFT
 
//--Change to FALSE to Use a Random Delay Time
#define RANDOM_DELAY_TOP  FALSE
 
//--Maximum Amount X will Vary (+-) During Swing
#define X_VARIANCE        5.0 
 
#define BACK_SWING_LOWER  38.0
#define BACK_SWING_UPPER  38.0
 
#define DOWN_SWING_LOWER  32.0
#define DOWN_SWING_UPPER  32.0
 
#define DELAY_TOP_LOWER  685
#define DELAY_TOP_UPPER  685
 
//--------------------------------------------------
const int8 S[] = {
  100,95,90,85,80,75,
  0,12,14,16,18,20};
 
 
fix32 rnd_back,back_val;
fix32 rnd_down,down_val;
int rnd_delay,delay;
fix32 rnd_x,rx_val,rx_count;
fix32 ry_val,back_max_val;
int swing,set,swing_y,swing_x,back,down;
fix32 putt_val;
int putt,idx;
 
int b,bb,bb_array;
 
init {
  swing_y = SWING_STICK;
  swing_x = SWING_STICK - 1;
  back_max_val = 100.0;
}
 
combo SET {
  wait(1000);
  rx_val = rnd_x;
  back_val = rnd_back;
  down_val = rnd_down;
  if(RANDOM_DELAY_TOP) delay = rnd_delay;
  set = TRUE;
  back = TRUE;
  wait(10);
}
 
combo DELAY_TOP {
  wait(delay);
  down = TRUE;
  wait(10);
}
 
main {
 
  set_val(30,back_val);
  set_val(31,down_val);
  set_val(32,delay / 10);
  set_val(30,back_max_val);
  set_val(34,rx_val);
 
  //--swing strength
  if(get_val(XB1_A) && event_active(XB1_DOWN))
  back_max_val -= 16.0;
  if(get_val(XB1_A) && event_active(XB1_UP)) {
    back_max_val -= 2.0;
    if(back_max_val > 100.0) back_max_val = 100.0;
  }
 
  //--swing
  if(get_val(XB1_RT) && event_active(XB1_A)) {
    swing = TRUE;
    set = FALSE;
    if(!RANDOM_DELAY_TOP) delay = 780;
 
  }
  //--#1
  if(get_val(XB1_LT) && event_active(XB1_A)) {
    swing = TRUE;
    set = FALSE;
    delay = 685;
  }
  //--#3
  if(get_val(XB1_UP) && event_active(XB1_A)) {
    swing = TRUE;
    set = FALSE;
    delay = 865;
  }
  //--#4
  if(get_val(XB1_DOWN) && event_active(XB1_A)) {
    swing = TRUE;
    set = FALSE;
    delay = 935;
  }
  //--#5
  if(get_val(XB1_UP) && event_active(XB1_RT)) {
    swing = TRUE;
    set = FALSE;
    delay = 995;
  }
  //--#6
  if(get_val(XB1_UP) && event_active(XB1_B)) {
    swing = TRUE;
    set = FALSE;
    delay = 1050;
  }
  //--#7
  if(get_val(XB1_DOWN) && event_active(XB1_RT)) {
    swing = TRUE;
    set = FALSE;
    delay = 1135;
  }
  //--#8
  if(get_val(XB1_UP) && event_active(XB1_Y)) {
    swing = TRUE;
    set = FALSE;
    delay =1325;
  }
  {
    if(get_val(XB1_RT)) set_val(XB1_LX, 0.0)
 
 
    if(get_val(XB1_LX) > 3.0) set_val(XB1_LX, 3.0);
 
    if(get_val(XB1_LX)<-3.0) set_val(XB1_LX, -3.0);
  }
 
  //--------------------------------------------------------------
  //--Swing
  if(swing) {
    if(!set) {
      combo_run(SET);
    }else{
      if(back) {
        ry_val += back_val;
        if(ry_val > back_max_val) {
          ry_val = back_max_val;
          back = FALSE;
          combo_run(DELAY_TOP);
        }
      }
      if(down) {
        ry_val -= down_val;
        if(ry_val < -100.0) {
          ry_val = -100.0;
          down = FALSE;
          swing = FALSE;
          back_max_val = 100.0;
        }
      }
      rx_count += 1.0;
      if(rx_count == 5.0) {
        //--new RX every 20 ms
        rx_val = rnd_x;
        rx_count = 0.0;
      }
      set_val(swing_y,ry_val);
      set_val(swing_x,rx_val);
    }
  }
 
  //--------------------------------------------------------------
  //--PUTT
  if(putt) {
    ry_val -= putt_val;
    if(ry_val <= -100.0) {
      ry_val = -100.0;
      putt = FALSE;
    }
    set_val(swing_y,ry_val);
  }
 
 
  //--------------------------------------------------------------
  //--SCROLL VALS
  rnd_back += 1.0;
  rnd_down += 1.0;
  rnd_x += 1.0;
  rnd_delay += 10;
 
  if(rnd_back  > BACK_SWING_UPPER) rnd_back  = BACK_SWING_LOWER;
  if(rnd_down  > DOWN_SWING_UPPER) rnd_down  = DOWN_SWING_LOWER;
  if(rnd_x > X_VARIANCE)           rnd_x     = inv(X_VARIANCE);   
  if(rnd_delay > DELAY_TOP_UPPER)  rnd_delay = DELAY_TOP_LOWER;
}
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: script conversion

Postby Flyers1987 » Tue Oct 22, 2019 5:07 am

i dont no why but this script isnt working on titan 2? the auto swing...it worked on titan 1 for my friend with one line added....just spent $160 Canadian getting this delivered...im a idiot...if this script can be made to work on titan 2 it would be by far the best script ever made for The Golf Club 2019
User avatar
Flyers1987
Sergeant Major
Sergeant Major
 
Posts: 74
Joined: Mon Apr 29, 2019 7:22 pm

Re: script conversion

Postby DontAtMe » Tue Oct 22, 2019 5:36 am

Use this then,
This is the script converted to run the exact same as it did on the CM.
Code: Select all
#pragma METAINFO("golf2019.Titan_Two.gpc", 1, 0, "Buffy's GPC Converter v0.26r4")
#include <titanone.gph>
 
 
//v1.2.T2.custom
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
//Posted : Wednesday 19th of June, 2019 23:01 UTC 
/* The Golf Club 2019
 
 
v1.2
    Added X_VARIANCE.  Maximum amount X axis will vary (+-)
 
 
 
v1.1
    Chip - LT/L2 + A/Cross
    Swing Strenth - Hold A/Cross then Up/Down (+- 5 each tap) TRACE_4 shows max backswing value
------------------------------------------------------------------------------------------
v1.0
    ***IF YOU USE LEFT STICK TO SWING SET SWING_STICK = LEFT;***
 
    To use Random Delay Times at Top of The Swing set RANDOM_DELAY_TOP = TRUE
 
    Full Swing - HOLD LT/L2 then tap RT/R2
 
    Smooth Follow Through on Putt - Pull swing stick back untill putter head is at desired location then tap
                                    either LT/L2 or RT/R2
                                                                     **/
//--Change to LEFT for Left Stick Swing
//--Change to FALSE to Use a Random Delay Time
//--Maximum Amount X will Vary (+-) During Swing
//--------------------------------------------------
//--swing strength
//--swing
//--#1
//--#3
//--#4
//--#5
//--#6
//--#7
//--#8
//--------------------------------------------------------------
//--Swing
//--new RX every 20 ms
//--------------------------------------------------------------
//--PUTT
//--------------------------------------------------------------
//--SCROLL VALS
 
 
define RIGHT = 10;
define LEFT = 12;
define SWING_STICK = LEFT;
define RANDOM_DELAY_TOP = FALSE;
define X_VARIANCE = 5;
define BACK_SWING_LOWER = 38;
define BACK_SWING_UPPER = 38;
define DOWN_SWING_LOWER = 32;
define DOWN_SWING_UPPER = 32;
define DELAY_TOP_LOWER = 685;
define DELAY_TOP_UPPER = 685;
 
const int8 SP[] = {
    100, 95, 90, 85, 80, 75,
    0, 12, 14, 16, 18, 20
};
 
int rnd_back, back_val;
int rnd_down, down_val;
int rnd_delay, delay;
int rnd_x, rx_val, rx_count;
int ry_val, back_max_val;
int swing, set, swing_y, swing_x, back, down;
int putt, putt_val, idx;
int b, bb, bb_array;
 
init {
    swing_y = SWING_STICK;
    swing_x = SWING_STICK - 1;
    back_max_val = 100;
}
 
combo c_SET {
    wait(1000);
    rx_val = rnd_x;
    back_val = rnd_back;
    down_val = rnd_down;
    if (RANDOM_DELAY_TOP) delay = rnd_delay;
    set = TRUE;
    back = TRUE;
    wait(10);
}
 
combo c_DELAY_TOP {
    wait(delay);
    down = TRUE;
    wait(10);
}
 
main {
    set_val(30, back_val);
    set_val(31, down_val);
    set_val(32, delay / 10);
    set_val(30, back_max_val);
    set_val(34, rx_val);
    if (get_val(XB1_A) && event_press(XB1_DOWN)) back_max_val -= 16;
    if (get_val(XB1_A) && event_press(XB1_UP)) {
        back_max_val -= 2;
        if (back_max_val > 100) back_max_val = 100;
    }
    if (get_val(XB1_RT) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        if (!RANDOM_DELAY_TOP) delay = 780;
    }
    if (get_val(XB1_LT) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 685;
    }
    if (get_val(XB1_UP) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 865;
    }
    if (get_val(XB1_DOWN) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 935;
    }
    if (get_val(XB1_UP) && event_press(XB1_RT)) {
        swing = TRUE;
        set = FALSE;
        delay = 995;
    }
    if (get_val(XB1_UP) && event_press(XB1_B)) {
        swing = TRUE;
        set = FALSE;
        delay = 1050;
    }
    if (get_val(XB1_DOWN) && event_press(XB1_RT)) {
        swing = TRUE;
        set = FALSE;
        delay = 1135;
    }
    if (get_val(XB1_UP) && event_press(XB1_Y)) {
        swing = TRUE;
        set = FALSE;
        delay = 1325;
    }
    if (get_val(XB1_RT)) set_val(XB1_LX, 0);
    if (get_val(XB1_LX) > 3) set_val(XB1_LX, 3);
    if (get_val(XB1_LX) <- 3) set_val(XB1_LX, - 3);
    if (swing) {
        if (!set) {
            combo_run(c_SET);
        }
        else {
            if (back) {
                ry_val += back_val;
                if (ry_val > back_max_val) {
                    ry_val = back_max_val;
                    back = FALSE;
                    combo_run(c_DELAY_TOP);
                }
            }
            if (down) {
                ry_val -= down_val;
                if (ry_val <- 100) {
                    ry_val =- 100;
                    down = FALSE;
                    swing = FALSE;
                    back_max_val = 100;
                }
            }
            rx_count += 1;
            if (rx_count == 5) {
                rx_val = rnd_x;
                rx_count = 0;
            }
            set_val(swing_y, ry_val);
            set_val(swing_x, rx_val);
        }
    }
    if (putt) {
        ry_val -= putt_val;
        if (ry_val <= - 100) {
            ry_val =- 100;
            putt = FALSE;
        }
        set_val(swing_y, ry_val);
    }
    rnd_back += 1;
    rnd_down += 1;
    rnd_x += 1;
    rnd_delay += 10;
    if (rnd_back > BACK_SWING_UPPER) rnd_back = BACK_SWING_LOWER;
    if (rnd_down > DOWN_SWING_UPPER) rnd_down = DOWN_SWING_LOWER;
    if (rnd_x > X_VARIANCE) rnd_x = inv(X_VARIANCE);
    if (rnd_delay > DELAY_TOP_UPPER) rnd_delay = DELAY_TOP_LOWER;
}

I already tested this script on both devices, the script runs the exact same on both devices.

Flyers1987 wrote:it worked on titan 1 for my friend

I find this very hard to believe considering that this script would not even compile on the Titan 1, its a CM script.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: script conversion

Postby Flyers1987 » Tue Oct 22, 2019 5:42 am

I appreciate the effort however it doesn't work for decimal points which is the reason I spent almost $200 to get the Titan II 100% for this script. now I'm up shits creek because I told several other people, now they have purchased the Titan 2 and I'm going to look like an idiot
User avatar
Flyers1987
Sergeant Major
Sergeant Major
 
Posts: 74
Joined: Mon Apr 29, 2019 7:22 pm

Re: script conversion

Postby Flyers1987 » Tue Oct 22, 2019 5:48 am

Code: Select all
 
/* The Golf Club 2019
 
 
v1.2
Added X_VARIANCE. Maximum amount X axis will vary (+-)
 
 
 
v1.1
Chip - LT/L2 + A/Cross
Swing Strenth - Hold A/Cross then Up/Down (+- 5 each tap) TRACE_4 shows max backswing value
------------------------------------------------------------------------------------------
v1.0
***IF YOU USE LEFT STICK TO SWING SET SWING_STICK = LEFT;***
 
To use Random Delay Times at Top of The Swing set RANDOM_DELAY_TOP = TRUE
 
Full Swing - HOLD LT/L2 then tap RT/R2
 
Smooth Follow Through on Putt - Pull swing stick back untill putter head is at desired location then tap
either LT/L2 or RT/R2
**/
//--Change to LEFT for Left Stick Swing
//--Change to FALSE to Use a Random Delay Time
//--Maximum Amount X will Vary (+-) During Swing
//--------------------------------------------------
//--swing strength
//--swing
//--chip
//--putt smooth follow through
//--------------------------------------------------------------
//--Swing
//--new RX every 50 ms
//--------------------------------------------------------------
//--PUTT
//--------------------------------------------------------------
//--SCROLL VALS
 
 
define RIGHT = 10;
define LEFT = 12;
define SWING_STICK = RIGHT;
define RANDOM_DELAY_TOP = TRUE;
define X_VARIANCE = 15;
define BACK_SWING_LOWER = 10;
define BACK_SWING_UPPER = 20;
define DOWN_SWING_LOWER = 30;
define DOWN_SWING_UPPER = 40;
define DELAY_TOP_LOWER = 700;
define DELAY_TOP_UPPER = 800;
 
int SP[12];
 
int rnd_back, back_val;
int rnd_down, down_val;
int rnd_delay, delay;
int rnd_x, rx_val, rx_count;
int ry_val, back_max_val;
int swing, set, swing_y, swing_x, back, down;
int putt, putt_val, idx;
int b;
int bb;
int bb_array[3];
init{
  SP[0] = 100;
  SP[1]95;
  SP[2]90;
  SP[3] =   85;
  SP[4] =   80;
  SP[5] =   75;
  SP[6] = 0;
  SP[7]12;
  SP[8] =   14;
  SP[9] =   16;
  SP[10] =   18;
  SP[11]20;
  swing_y = SWING_STICK;
  swing_x = SWING_STICK - 1;
  back_max_val = 100;
}
 
 
main {
  set_val(30, back_val);
  set_val(31, down_val);
  set_val(32, delay / 10);
  set_val(33, back_max_val);
  set_val(34, rx_val);
  if (get_val(XB1_A) && event_press(XB1_DOWN)) back_max_val = back_max_val - 5;
  if (get_val(XB1_A) && event_press(XB1_UP)) {
    back_max_val =  back_max_val+5;
    if (back_max_val > 100) back_max_val = 100;
  }
  if (get_val(XB1_LT) && event_press(XB1_RT)) {
    swing = TRUE;
    set = FALSE;
    if (!RANDOM_DELAY_TOP) delay = 750;
  }
  if (get_val(XB1_LT) && event_press(XB1_A)) {
    swing = TRUE;
    set = FALSE;
    delay = 900;
  }
  if (get_val(swing_y) > 20 && event_press(XB1_LT)) {
    putt = TRUE;
    ry_val = get_val(swing_y);
    if (ry_val < 30) putt_val = 5;
    if (ry_val > 30 && ry_val < 70) putt_val = 10;
    if (ry_val > 70) putt_val = 20;
  }
  if (swing) {
    if (!set) {
      combo_run(c_SET);
    }
    else {
      if (back) {
        ry_val = ry_val +back_val;
        if (ry_val > back_max_val) {
          ry_val = back_max_val;
          back = FALSE;
          combo_run(c_DELAY_TOP);
        }
      }
      if (down) {
        ry_val =ry_val- down_val;
        if (ry_val <- 100) {
          ry_val = -100;
          down = FALSE;
          swing = FALSE;
          back_max_val = 100;
        }
      }
      rx_count = rx_count+ 1;
      if (rx_count == 5) {
        rx_val = rnd_x;
        rx_count = 0;
      }
      set_val(swing_y, ry_val);
      set_val(swing_x, rx_val);
    }
  }
  if (putt) {
    ry_val = ry_val-putt_val;
    if (ry_val <= - 100) {
      ry_val =- 100;
      putt = FALSE;
    }
    set_val(swing_y, ry_val);
  }
  rnd_back =rnd_back +1;
  rnd_down =rnd_down+1;
  rnd_x = rnd_x+1;
  rnd_delay =rnd_delay +10;
  if (rnd_back > BACK_SWING_UPPER) rnd_back = BACK_SWING_LOWER;
  if (rnd_down > DOWN_SWING_UPPER) rnd_down = DOWN_SWING_LOWER;
  if (rnd_x > X_VARIANCE) rnd_x = inv(X_VARIANCE);
  if (rnd_delay > DELAY_TOP_UPPER) rnd_delay = DELAY_TOP_LOWER;
}
 
 
combo c_SET {
  wait(1000);
  rx_val = rnd_x;
  back_val = rnd_back;
  down_val = rnd_down;
  if (RANDOM_DELAY_TOP) delay = rnd_delay;
  set = TRUE;
  back = TRUE;
}
 
combo c_DELAY_TOP {
  wait(delay);
  down = TRUE;
}
 
Flyers1987 wrote:I appreciate the effort however it doesn't work for decimal points which is the reason I spent almost $200 to get the Titan II 100% for this script. now I'm up shits creek because I told several other people, now they have purchased the Titan 2 and I'm going to look like an idiot

This is the converted script for Titan one
User avatar
Flyers1987
Sergeant Major
Sergeant Major
 
Posts: 74
Joined: Mon Apr 29, 2019 7:22 pm

Re: script conversion

Postby DontAtMe » Tue Oct 22, 2019 5:51 am

Flyers1987 wrote:I appreciate the effort however it doesn't work for decimal points.


Code: Select all
#pragma METAINFO("golf2019.Titan_Two.gpc", 1, 0, "Buffy's GPC Converter v0.26r4")
#include <titanone.gph>
 
 
//v1.2.T2.custom
//Posted by Batts, a member of the community in the device Forums - https://device.com/forums
//Posted : Wednesday 19th of June, 2019 23:01 UTC 
/* The Golf Club 2019
 
 
v1.2
    Added X_VARIANCE.  Maximum amount X axis will vary (+-)
 
 
 
v1.1
    Chip - LT/L2 + A/Cross
    Swing Strenth - Hold A/Cross then Up/Down (+- 5 each tap) TRACE_4 shows max backswing value
------------------------------------------------------------------------------------------
v1.0
    ***IF YOU USE LEFT STICK TO SWING SET SWING_STICK = LEFT;***
 
    To use Random Delay Times at Top of The Swing set RANDOM_DELAY_TOP = TRUE
 
    Full Swing - HOLD LT/L2 then tap RT/R2
 
    Smooth Follow Through on Putt - Pull swing stick back untill putter head is at desired location then tap
                                    either LT/L2 or RT/R2
                                                                     **/
//--Change to LEFT for Left Stick Swing
//--Change to FALSE to Use a Random Delay Time
//--Maximum Amount X will Vary (+-) During Swing
//--------------------------------------------------
//--swing strength
//--swing
//--#1
//--#3
//--#4
//--#5
//--#6
//--#7
//--#8
//--------------------------------------------------------------
//--Swing
//--new RX every 20 ms
//--------------------------------------------------------------
//--PUTT
//--------------------------------------------------------------
//--SCROLL VALS
 
 
define RIGHT = 10;
define LEFT = 12;
define SWING_STICK = LEFT;
define RANDOM_DELAY_TOP = FALSE;
define X_VARIANCE = 5;
define BACK_SWING_LOWER = 38;
define BACK_SWING_UPPER = 38;
define DOWN_SWING_LOWER = 32;
define DOWN_SWING_UPPER = 32;
define DELAY_TOP_LOWER = 685;
define DELAY_TOP_UPPER = 685;
 
const int8 SP[] = {
    100, 95, 90, 85, 80, 75,
    0, 12, 14, 16, 18, 20
};
 
int rnd_back, back_val;
int rnd_down, down_val;
int rnd_delay, delay;
int rnd_x, rx_val, rx_count;
int ry_val, back_max_val;
int swing, set, swing_y, swing_x, back, down;
int putt, putt_val, idx;
int b, bb, bb_array;
 
init {
    swing_y = SWING_STICK;
    swing_x = SWING_STICK - 1;
    back_max_val = 100;
}
 
combo c_SET {
    wait(1000);
    rx_val = rnd_x;
    back_val = rnd_back;
    down_val = rnd_down;
    if (RANDOM_DELAY_TOP) delay = rnd_delay;
    set = TRUE;
    back = TRUE;
    wait(10);
}
 
combo c_DELAY_TOP {
    wait(delay);
    down = TRUE;
    wait(10);
}
 
main {
    set_val(30, back_val);
    set_val(31, down_val);
    set_val(32, delay / 10);
    set_val(30, back_max_val);
    set_val(34, rx_val);
    if (get_val(XB1_A) && event_press(XB1_DOWN)) back_max_val -= 16;
    if (get_val(XB1_A) && event_press(XB1_UP)) {
        back_max_val -= 2;
        if (back_max_val > 100) back_max_val = 100;
    }
    if (get_val(XB1_RT) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        if (!RANDOM_DELAY_TOP) delay = 780;
    }
    if (get_val(XB1_LT) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 685;
    }
    if (get_val(XB1_UP) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 865;
    }
    if (get_val(XB1_DOWN) && event_press(XB1_A)) {
        swing = TRUE;
        set = FALSE;
        delay = 935;
    }
    if (get_val(XB1_UP) && event_press(XB1_RT)) {
        swing = TRUE;
        set = FALSE;
        delay = 995;
    }
    if (get_val(XB1_UP) && event_press(XB1_B)) {
        swing = TRUE;
        set = FALSE;
        delay = 1050;
    }
    if (get_val(XB1_DOWN) && event_press(XB1_RT)) {
        swing = TRUE;
        set = FALSE;
        delay = 1135;
    }
    if (get_val(XB1_UP) && event_press(XB1_Y)) {
        swing = TRUE;
        set = FALSE;
        delay = 1325;
    }
    if (get_val(XB1_RT)) set_val(XB1_LX, 0);
    if (get_val(XB1_LX) > 3) set_val(XB1_LX, 3);
    if (get_val(XB1_LX) <- 3) set_val(XB1_LX, - 3);
    if (swing) {
        if (!set) {
            combo_run(c_SET);
        }
        else {
            if (back) {
                ry_val += back_val;
                if (ry_val > back_max_val) {
                    ry_val = back_max_val;
                    back = FALSE;
                    combo_run(c_DELAY_TOP);
                }
            }
            if (down) {
                ry_val -= down_val;
                if (ry_val <- 100) {
                    ry_val =- 100;
                    down = FALSE;
                    swing = FALSE;
                    back_max_val = 100;
                }
            }
            rx_count += 1;
            if (rx_count == 5) {
                rx_val = rnd_x;
                rx_count = 0;
            }
            set_val(swing_y, ry_val);
            set_val(swing_x, rx_val);
        }
    }
    if (putt) {
        ry_val -= putt_val;
        if (ry_val <= - 100) {
            ry_val =- 100;
            putt = FALSE;
        }
        set_val(swing_y, ry_val);
    }
    rnd_back += 1;
    rnd_down += 1;
    rnd_x += 1;
    rnd_delay += 10;
    if (rnd_back > BACK_SWING_UPPER) rnd_back = BACK_SWING_LOWER;
    if (rnd_down > DOWN_SWING_UPPER) rnd_down = DOWN_SWING_LOWER;
    if (rnd_x > X_VARIANCE) rnd_x = inv(X_VARIANCE);
    if (rnd_delay > DELAY_TOP_UPPER) rnd_delay = DELAY_TOP_LOWER;
}
 
main {
  fix32 decimals;
  if(system_time()%5==0){ decimals = rand(); }
  '`\set_val(STICK_1_X, clamp(get_val(STICK_1_X)' + decimals,-100f,100f));
  '`\set_val(STICK_1_Y, clamp(get_val(STICK_1_Y)' + decimals,-100f,100f));
}
 


Added your precious decimals. :smile0517:
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: script conversion

Postby Flyers1987 » Tue Oct 22, 2019 5:53 am

I see you're getting mad however the decimal points are what make this script perfect. you have the knowledge for this I don't. I do appreciate it. I'm under a lot of pressure from these dudes cuz I told them to get Titan twos for the golf club 2019
User avatar
Flyers1987
Sergeant Major
Sergeant Major
 
Posts: 74
Joined: Mon Apr 29, 2019 7:22 pm

Re: script conversion

Postby Flyers1987 » Tue Oct 22, 2019 5:59 am

For some reason it doesn't work like it does on Titan one or device could it be that I'm compiling it wrong. I have no idea. Thanks for putting in the effort though
User avatar
Flyers1987
Sergeant Major
Sergeant Major
 
Posts: 74
Joined: Mon Apr 29, 2019 7:22 pm

Re: script conversion

Postby DontAtMe » Tue Oct 22, 2019 5:59 am

I am having a hard time believing you even tested any of the scripts made for you today.
I added decimals to the sticks in this script.

Please test the script before leaving anymore feedback :wink:.
Last edited by DontAtMe on Tue Oct 22, 2019 7:38 am, edited 1 time in total.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: script conversion

Postby DontAtMe » Tue Oct 22, 2019 6:01 am

Flyers1987 wrote:could it be that I'm compiling it wrong.

This is likely the case.
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

PreviousNext

Return to Titan Two Device

Who is online

Users browsing this forum: No registered users and 174 guests