Using Titan 1 script on Titan 2
Re: Using Titan 1 script on Titan 2
I have converted it to native T2 code and it should work now with decimals
- Code: Select all
/* The Golf Club 2019
v1.2.T2.custom
T2 converted for decimal value usage
Added RND_MOD. Decimal value the axis will vary (+-) each millisecond
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
#include <xb1.gph>
#define RIGHT 10
#define LEFT 12
#define SWING_STICK RIGHT
#define RANDOM_DELAY_TOP TRUE
#define X_VARIANCE 15.0
#define RND_MOD 0.125
#define BACK_SWING_LOWER 10.0
#define BACK_SWING_UPPER 20.0
#define DOWN_SWING_LOWER 30.0
#define DOWN_SWING_UPPER 40.0
#define DELAY_TOP_LOWER 700
#define DELAY_TOP_UPPER 800
int SP[12];
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, back, down;
uint8 swing_y, swing_x;
int putt, idx;
fix32 putt_val;
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.0;
}
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_active(XB1_DOWN)) back_max_val = back_max_val - 5.0;
if (get_val(XB1_A) && event_active(XB1_UP)) {
back_max_val = back_max_val+5.0;
if (back_max_val > 100.0) back_max_val = 100.0;
}
if (get_val(XB1_LT) && event_active(XB1_RT)) {
swing = TRUE;
set = FALSE;
if (!RANDOM_DELAY_TOP) delay = 750;
}
if (get_val(XB1_LT) && event_active(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 900;
}
if (get_val(swing_y) > 20.0 && event_active(XB1_LT)) {
putt = TRUE;
ry_val = get_val(swing_y);
if (ry_val < 30.0) putt_val = 5.0;
if (ry_val > 30.0 && ry_val < 70.0) putt_val = 10.0;
if (ry_val > 70.0) putt_val = 20.0;
}
if (swing) {
if (!set) {
combo_run(c_SET);
}
else {
if (elapsed_time()) {
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.0) {
ry_val = -100.0;
down = FALSE;
swing = FALSE;
back_max_val = 100.0;
}
}
rx_count = rx_count+ 1.0;
if (rx_count == 5.0) {
rx_val = rnd_x;
rx_count = 0.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.0) {
ry_val =- 100.0;
putt = FALSE;
}
set_val(swing_y, ry_val);
}
if (elapsed_time()) {
rnd_back =rnd_back+RND_MOD;
rnd_down =rnd_down+RND_MOD;
rnd_x = rnd_x+RND_MOD;
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;
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Using Titan 1 script on Titan 2
Thanks bro!!!!
-
Flyers1987 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Re: Using Titan 1 script on Titan 2
Scachi wrote:I have converted it to native T2 code and it should work now with decimalsis there any chance you tested this? And thanks for taking the time to convert the script!!
- Code: Select all
/* The Golf Club 2019
v1.2.T2.custom
T2 converted for decimal value usage
Added RND_MOD. Decimal value the axis will vary (+-) each millisecond
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
#include <xb1.gph>
#define RIGHT 10
#define LEFT 12
#define SWING_STICK RIGHT
#define RANDOM_DELAY_TOP TRUE
#define X_VARIANCE 15.0
#define RND_MOD 0.125
#define BACK_SWING_LOWER 10.0
#define BACK_SWING_UPPER 20.0
#define DOWN_SWING_LOWER 30.0
#define DOWN_SWING_UPPER 40.0
#define DELAY_TOP_LOWER 700
#define DELAY_TOP_UPPER 800
int SP[12];
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, back, down;
uint8 swing_y, swing_x;
int putt, idx;
fix32 putt_val;
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.0;
}
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_active(XB1_DOWN)) back_max_val = back_max_val - 5.0;
if (get_val(XB1_A) && event_active(XB1_UP)) {
back_max_val = back_max_val+5.0;
if (back_max_val > 100.0) back_max_val = 100.0;
}
if (get_val(XB1_LT) && event_active(XB1_RT)) {
swing = TRUE;
set = FALSE;
if (!RANDOM_DELAY_TOP) delay = 750;
}
if (get_val(XB1_LT) && event_active(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 900;
}
if (get_val(swing_y) > 20.0 && event_active(XB1_LT)) {
putt = TRUE;
ry_val = get_val(swing_y);
if (ry_val < 30.0) putt_val = 5.0;
if (ry_val > 30.0 && ry_val < 70.0) putt_val = 10.0;
if (ry_val > 70.0) putt_val = 20.0;
}
if (swing) {
if (!set) {
combo_run(c_SET);
}
else {
if (elapsed_time()) {
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.0) {
ry_val = -100.0;
down = FALSE;
swing = FALSE;
back_max_val = 100.0;
}
}
rx_count = rx_count+ 1.0;
if (rx_count == 5.0) {
rx_val = rnd_x;
rx_count = 0.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.0) {
ry_val =- 100.0;
putt = FALSE;
}
set_val(swing_y, ry_val);
}
if (elapsed_time()) {
rnd_back =rnd_back+RND_MOD;
rnd_down =rnd_down+RND_MOD;
rnd_x = rnd_x+RND_MOD;
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 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Re: Using Titan 1 script on Titan 2
No, I didn't.
I forgot to adjust the stick mapping to the Titan two.
This one is finally doing something (don't have the game, only checked via Device Monitor)
I forgot to adjust the stick mapping to the Titan two.
This one is finally doing something (don't have the game, only checked via Device Monitor)
- Code: Select all
/* The Golf Club 2019
v1.2.T2.custom
T2 converted for decimal value usage
Added RND_MOD. Decimal value the axis will vary (+-) each millisecond
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
#include <xb1.gph>
#define RIGHT 22
#define LEFT 24
#define SWING_STICK RIGHT
#define RANDOM_DELAY_TOP TRUE
#define X_VARIANCE 15.0
#define RND_MOD 0.125
#define BACK_SWING_LOWER 10.0
#define BACK_SWING_UPPER 20.0
#define DOWN_SWING_LOWER 30.0
#define DOWN_SWING_UPPER 40.0
#define DELAY_TOP_LOWER 700
#define DELAY_TOP_UPPER 800
int SP[12];
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, back, down;
uint8 swing_y, swing_x;
int putt, idx;
fix32 putt_val;
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.0;
}
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_active(XB1_DOWN)) back_max_val = back_max_val - 5.0;
if (get_val(XB1_A) && event_active(XB1_UP)) {
back_max_val = back_max_val+5.0;
if (back_max_val > 100.0) back_max_val = 100.0;
}
if (get_val(XB1_LT) && event_active(XB1_RT)) {
swing = TRUE;
set = FALSE;
if (!RANDOM_DELAY_TOP) delay = 750;
}
if (get_val(XB1_LT) && event_active(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 900;
}
if (get_val(swing_y) > 20.0 && event_active(XB1_LT)) {
putt = TRUE;
ry_val = get_val(swing_y);
if (ry_val < 30.0) putt_val = 5.0;
if (ry_val > 30.0 && ry_val < 70.0) putt_val = 10.0;
if (ry_val > 70.0) putt_val = 20.0;
}
if (swing) {
if (!set) {
combo_run(c_SET);
}
else {
if (elapsed_time()) {
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.0) {
ry_val = -100.0;
down = FALSE;
swing = FALSE;
back_max_val = 100.0;
}
}
rx_count = rx_count+ 1.0;
if (rx_count == 5.0) {
rx_val = rnd_x;
rx_count = 0.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.0) {
ry_val =- 100.0;
putt = FALSE;
}
set_val(swing_y, ry_val);
}
if (elapsed_time()) {
rnd_back =rnd_back+RND_MOD;
rnd_down =rnd_down+RND_MOD;
rnd_x = rnd_x+RND_MOD;
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;
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Using Titan 1 script on Titan 2
Scachi wrote:No, I didn't.
I forgot to adjust the stick mapping to the Titan two.
This one is finally doing something (don't have the game, only checked via Device Monitor)is it showing decimal points when combo is activated?
- Code: Select all
/* The Golf Club 2019
v1.2.T2.custom
T2 converted for decimal value usage
Added RND_MOD. Decimal value the axis will vary (+-) each millisecond
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
#include <xb1.gph>
#define RIGHT 22
#define LEFT 24
#define SWING_STICK RIGHT
#define RANDOM_DELAY_TOP TRUE
#define X_VARIANCE 15.0
#define RND_MOD 0.125
#define BACK_SWING_LOWER 10.0
#define BACK_SWING_UPPER 20.0
#define DOWN_SWING_LOWER 30.0
#define DOWN_SWING_UPPER 40.0
#define DELAY_TOP_LOWER 700
#define DELAY_TOP_UPPER 800
int SP[12];
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, back, down;
uint8 swing_y, swing_x;
int putt, idx;
fix32 putt_val;
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.0;
}
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_active(XB1_DOWN)) back_max_val = back_max_val - 5.0;
if (get_val(XB1_A) && event_active(XB1_UP)) {
back_max_val = back_max_val+5.0;
if (back_max_val > 100.0) back_max_val = 100.0;
}
if (get_val(XB1_LT) && event_active(XB1_RT)) {
swing = TRUE;
set = FALSE;
if (!RANDOM_DELAY_TOP) delay = 750;
}
if (get_val(XB1_LT) && event_active(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 900;
}
if (get_val(swing_y) > 20.0 && event_active(XB1_LT)) {
putt = TRUE;
ry_val = get_val(swing_y);
if (ry_val < 30.0) putt_val = 5.0;
if (ry_val > 30.0 && ry_val < 70.0) putt_val = 10.0;
if (ry_val > 70.0) putt_val = 20.0;
}
if (swing) {
if (!set) {
combo_run(c_SET);
}
else {
if (elapsed_time()) {
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.0) {
ry_val = -100.0;
down = FALSE;
swing = FALSE;
back_max_val = 100.0;
}
}
rx_count = rx_count+ 1.0;
if (rx_count == 5.0) {
rx_val = rnd_x;
rx_count = 0.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.0) {
ry_val =- 100.0;
putt = FALSE;
}
set_val(swing_y, ry_val);
}
if (elapsed_time()) {
rnd_back =rnd_back+RND_MOD;
rnd_down =rnd_down+RND_MOD;
rnd_x = rnd_x+RND_MOD;
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 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Re: Using Titan 1 script on Titan 2
Im nervous it won't work because I convinced 2 buddies to buy Titan two's all for this script. I really appreciate all the work you've done on this though
-
Flyers1987 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Re: Using Titan 1 script on Titan 2
It uses & shows decimals.
We can always edit the script if there are problems with it or to improve it.
We can always edit the script if there are problems with it or to improve it.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Using Titan 1 script on Titan 2
Scachi wrote:It uses & shows decimals.
We can always edit the script if there are problems with it or to improve it.
I got my Titan two today It is not acting even close to the Titan one script. And Is there a way to change the milli secs from 50 milliseconds to more like 5
-
Flyers1987 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Re: Using Titan 1 script on Titan 2
I don't know what the difference is in the script is its not working at all . He lift the club up to swing but then doesn't downswing.
-
Flyers1987 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
script conversion
just got titan two because i was told it supports decimal points, im trying to convert a script form CR0NUS MAX that i use for The Golf Club 2019, i no titan 2 is better however i have no idea how to convert. being able to have random X and Y axis with decimal points is very important.PLEASE help me
here is the script
here is the script
- Code: Select all
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
*/
define RIGHT = 10;
define LEFT = 12;
//--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;
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 byte 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[0];
init {
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(30,back_max_val);
set_val(34,rx_val);
//--swing strength
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;
}
//--swing
if(get_val(XB1_RT) && event_press(XB1_A)) {
swing = TRUE;
set = FALSE;
if(!RANDOM_DELAY_TOP) delay = 780;
}
//--#1
if(get_val(XB1_LT) && event_press(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 685;
}
//--#3
if(get_val(XB1_UP) && event_press(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 865;
}
//--#4
if(get_val(XB1_DOWN) && event_press(XB1_A)) {
swing = TRUE;
set = FALSE;
delay = 935;
}
//--#5
if(get_val(XB1_UP) && event_press(XB1_RT)) {
swing = TRUE;
set = FALSE;
delay = 995;
}
//--#6
if(get_val(XB1_UP) && event_press(XB1_B)) {
swing = TRUE;
set = FALSE;
delay = 1050;
}
//--#7
if(get_val(XB1_DOWN) && event_press(XB1_RT)) {
swing = TRUE;
set = FALSE;
delay = 1135;
}
//--#8
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);
}
//--------------------------------------------------------------
//--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) {
ry_val = -100;
down = FALSE;
swing = FALSE;
back_max_val = 100;
}
}
rx_count += 1;
if(rx_count == 5) {
//--new RX every 20 ms
rx_val = rnd_x;
rx_count = 0;
}
set_val(swing_y,ry_val);
set_val(swing_x,rx_val);
}
}
//--------------------------------------------------------------
//--PUTT
if(putt) {
ry_val -= putt_val;
if(ry_val <= -100) {
ry_val = -100;
putt = FALSE;
}
set_val(swing_y,ry_val);
}
//--------------------------------------------------------------
//--SCROLL VALS
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;
}
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;
}
combo DELAY_TOP {
wait(delay);
down = TRUE;
}
-
Flyers1987 - Sergeant Major
- Posts: 74
- Joined: Mon Apr 29, 2019 7:22 pm
Who is online
Users browsing this forum: No registered users and 85 guests