Aim Assist
4 posts
• Page 1 of 1
Aim Assist
Can anyone convert for me this script for titan one? (i'm using titan one)
- Code: Select all
//Posted by ivanrdd, a member of the device Community - https://device.com/forums
//Posted : Tuesday 6th of April, 2021 11:16 UTC
//Posted by Sweet_EviL, a member of the device Community - <a href="https://device.com/forums" target="_blank">https://device.com/forums</a>
//Posted : Sunday 9th of August, 2020 10:02 CST6CDT
//#################################################################################################
//######################################### Sweet_EviL_14 #########################################
//#################################################################################################
//# _________ __ ___________ .__.____ ____ _____ #
//# / _____/_ _ __ ____ _____/ |_ \_ _____/__ _|__| | /_ | / | | #
//# \_____ \\ \/ \/ // __ \_/ __ \ __\ | __)_\ \/ / | | | |/ | |_ #
//# / \\ /\ ___/\ ___/| | | \\ /| | |___ | / ^ / #
//# /_______ / \/\_/ \___ >\___ >__| /_______ / \_/ |__|_______ \ |___\____ | #
//# \/ \/ \/ \/ \/ |__| #
//# Big thanks to BATTS legitclouds and all BETA TESTER#
//#################################################################################################
//###################################### Sweet_EviL_14 V10.00 ######################################
//#################################################################################################
//#################################################################################################
//####################################### Script parameters ######################################
//#################################################################################################
//#################################################################################################
//
// State machine variable
//
int Current_State = 0;
//
define Jitter = 5;
define MAX_ITERATION = 2;
define Max_Magnitude = 30;
int Iteration = MAX_ITERATION;
//
//#################################################################################################
//######################################### Script variable #######################################
//#################################################################################################
//
// Dont't change!
//
int Magnitude = 0;
//
//#################################################################################################
//############################################# MAIN ##############################################
//#################################################################################################
//
main
{
//update main every 17ms = 10 + 7
vm_tctrl(17);
//--LT pulled
if(get_val(PS4_L2))
{
if (Current_State == 0)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 1);
set_val(TRACE_1, Magnitude);
Current_State++;
}
else if (Current_State == 1)
{
Iteration--;
if(Iteration == 0)
{
Current_State ++;
Iteration = MAX_ITERATION;
}
}
else if (Current_State == 2)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
set_val(TRACE_2, Magnitude);
//Applying CORRECTION
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 0);
Current_State++;
}
else if (Current_State == 3)
{
Iteration--;
if(Iteration == 0)
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
}
}
else //--LT not pulled
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
}
//
//#################################################################################################
//############################################# FUNC ##############################################
//#################################################################################################
//
function Aim_Assist( Actual_X, Last_X, Magnitude, Boost)
{
if (Magnitude < Max_Magnitude)
{
if (Last_X < Actual_X || Last_X == Actual_X)
{
//set_val(PS4_LX,(-30));
if (Boost)
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
}
else //--moving left
{
//set_val(PS4_LX,(30));
if (Boost)
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
}
}
}
//
//#################################################################################################
//############################################# END ###############################################
//#################################################################################################
//--Rapid Fire (L2 + DOWN)
int Rapid_Fire = FALSE;
//--Layout
define FIRE = PS4_R2; //change to R1 for flipped bumpers
define ADS = PS4_L2; //change to L1 for flipped bumpers
define SPRINT = PS4_L3;
define TACTICAL = PS4_SHARE; //change to L2 for flipped bumpers
define LETHAL = PS4_R1; //change to R2 for flipped bumpers
define PRONE = PS4_R3;
define MELEE = PS4_CIRCLE;
define JUMP = PS4_CROSS;
define VIB_A = RUMBLE_A; //Leave Alone
/*-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |M|A|I|N| | |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
main {
if(get_val(ADS) && event_press(PS4_DOWN)) {
combo_run (vibrate);
Rapid_Fire=!Rapid_Fire;}
if (Rapid_Fire) {
if(get_val(FIRE)) {
combo_run (Rapiid_Fire);}}
/*-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | | | | | | | |C|O|M|B|O| |S|E|C|T|I|O|N| | | | | | | | | | | | | | | | | | | | | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+*/
}
combo Rapiid_Fire {
set_val(FIRE, 100);
wait(40);
set_val(FIRE, 0);
wait(30);
}
combo vibrate {
set_rumble(RUMBLE_A, 85);
wait(225);
reset_rumble();
}
//Posted : Saturday 8th of August, 2020 6:34 CST6CDT
/*
Hold L2/LT And Press D-PAD RIGHT to switch between Anti Recoil Profile 1 And 2
Green LED = Profile/Value 1
Pink LED = Profile/Value 2
*/
int AR,ARS,switch,AR_H,AR_I = 1; //Change 1 to -1 If you play with Inverted
main {
if(get_val(PS4_L2) && event_press(PS4_RIGHT)) {
switch=!switch;}
if(!switch) {
AR = 28; //Vertical Anti Recoil Profile/Value 1
AR_H = -12; //Horizontal Anti Recoil Profile/Value 1
LED(0,0,2,0);}
if(switch) {
AR = 24; //Vertical Anti Recoil Profile/Value 2
AR_H = -2; //Horizontal Anti Recoil Profile/Value 2
LED(0,0,0,2);}
if(get_val(PS4_L2) && get_val(PS4_R2))
combo_run(AR);
if(abs(get_val(PS4_RY)) > AR + 2 || abs(get_val(PS4_RX)) > AR + 2) {
combo_stop(AR);}}
combo AR {
ARS = get_val(PS4_RY) + AR;
if(ARS > 100) ARS = 100;
set_val(PS4_RY,ARS * AR_I);
ARS = get_val(PS4_RX) + AR_H;
if(ARS > 100) ARS = 100;
set_val(PS4_RX,ARS);}
function LED(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d);}
//Posted : Saturday 8th of August, 2020 6:34 CST6CDT
main {
deadzone(PS4_L2,PS4_L2,100,100);}
-
AiM-_LoCckv1 - Sergeant First Class
- Posts: 20
- Joined: Tue Mar 16, 2021 9:58 am
Re: Aim Assist
- Code: Select all
//Posted by ivanrdd, a member of the device Community - https://device.com/forums
//Posted : Tuesday 6th of April, 2021 11:16 UTC
//Posted by Sweet_EviL, a member of the device Community - <a href="https://device.com/forums" target="_blank">https://device.com/forums</a>
//Posted : Sunday 9th of August, 2020 10:02 CST6CDT
//#################################################################################################
//######################################### Sweet_EviL_14 #########################################
//#################################################################################################
//# _________ __ ___________ .__.____ ____ _____ #
//# / _____/_ _ __ ____ _____/ |_ \_ _____/__ _|__| | /_ | / | | #
//# \_____ \\ \/ \/ // __ \_/ __ \ __\ | __)_\ \/ / | | | |/ | |_ #
//# / \\ /\ ___/\ ___/| | | \\ /| | |___ | / ^ / #
//# /_______ / \/\_/ \___ >\___ >__| /_______ / \_/ |__|_______ \ |___\____ | #
//# \/ \/ \/ \/ \/ |__| #
//# Big thanks to BATTS legitclouds and all BETA TESTER#
//#################################################################################################
//###################################### Sweet_EviL_14 V10.00 ######################################
//#################################################################################################
//#################################################################################################
//####################################### Script parameters ######################################
//#################################################################################################
//--Rapid Fire (L2 + DOWN)
int Rapid_Fire = FALSE;
//--Layout
define FIRE = PS4_R2; //change to R1 for flipped bumpers
define ADS = PS4_L2; //change to L1 for flipped bumpers
define SPRINT = PS4_L3;
define TACTICAL = PS4_SHARE; //change to L2 for flipped bumpers
define LETHAL = PS4_R1; //change to R2 for flipped bumpers
define PRONE = PS4_R3;
define MELEE = PS4_CIRCLE;
define JUMP = PS4_CROSS;
define VIB_A = RUMBLE_A; //Leave Alone
int AR,ARS,switch,AR_H,AR_I = 1; //Change 1 to -1 If you play with Inverted
//#################################################################################################
//
// State machine variable
//
int Current_State = 0;
//
define Jitter = 5;
define MAX_ITERATION = 2;
define Max_Magnitude = 30;
int Iteration = MAX_ITERATION;
//
//#################################################################################################
//######################################### Script variable #######################################
//#################################################################################################
//
// Dont't change!
//
int Magnitude = 0;
//
//#################################################################################################
//############################################# MAIN ##############################################
//#################################################################################################
//
main
{
//update main every 17ms = 10 + 7
vm_tctrl(17);
//--LT pulled
if(get_val(PS4_L2))
{
if (Current_State == 0)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 1);
set_val(TRACE_1, Magnitude);
Current_State++;
}
else if (Current_State == 1)
{
Iteration--;
if(Iteration == 0)
{
Current_State ++;
Iteration = MAX_ITERATION;
}
}
else if (Current_State == 2)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
set_val(TRACE_2, Magnitude);
//Applying CORRECTION
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 0);
Current_State++;
}
else if (Current_State == 3)
{
Iteration--;
if(Iteration == 0)
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
}
}
else //--LT not pulled
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
if(get_val(ADS) && event_press(PS4_DOWN)) {
combo_run (vibrate);
Rapid_Fire=!Rapid_Fire;}
if (Rapid_Fire) {
if(get_val(FIRE)) {
combo_run (Rapiid_Fire);}}
if(get_val(PS4_L2) && event_press(PS4_RIGHT)) {
switch=!switch;}
if(!switch) {
AR = 28; //Vertical Anti Recoil Profile/Value 1
AR_H = -12; //Horizontal Anti Recoil Profile/Value 1
LED(0,0,2,0);}
if(switch) {
AR = 24; //Vertical Anti Recoil Profile/Value 2
AR_H = -2; //Horizontal Anti Recoil Profile/Value 2
LED(0,0,0,2);}
if(get_val(PS4_L2) && get_val(PS4_R2))
combo_run(cAR);
if(abs(get_val(PS4_RY)) > AR + 2 || abs(get_val(PS4_RX)) > AR + 2) {
combo_stop(cAR);}
deadzone(PS4_L2,PS4_L2,100,100);
}
//
//#################################################################################################
//############################################# FUNC ##############################################
//#################################################################################################
//
combo Rapiid_Fire {
set_val(FIRE, 100);
wait(40);
set_val(FIRE, 0);
wait(30);
}
combo vibrate {
set_rumble(RUMBLE_A, 85);
wait(225);
reset_rumble();
}
combo cAR {
ARS = get_val(PS4_RY) + AR;
if(ARS > 100) ARS = 100;
set_val(PS4_RY,ARS * AR_I);
ARS = get_val(PS4_RX) + AR_H;
if(ARS > 100) ARS = 100;
set_val(PS4_RX,ARS);}
function Aim_Assist( Actual_X, Last_X, Magnitude, Boost)
{
if (Magnitude < Max_Magnitude)
{
if (Last_X < Actual_X || Last_X == Actual_X)
{
//set_val(PS4_LX,(-30));
if (Boost)
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
}
else //--moving left
{
//set_val(PS4_LX,(30));
if (Boost)
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
}
}
}
function LED(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d);}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4533
- Joined: Wed May 22, 2019 5:39 am
Re: Aim Assist
it doesn't work. I keep getting this error
GPC error: cold war.gpc(28): syntax error, unexpected IDENTIFIER 'define'.
GPC error: cold war.gpc(28): syntax error, unexpected IDENTIFIER 'define'.
-
mikehoncho - Private
- Posts: 1
- Joined: Fri May 21, 2021 4:55 pm
Re: Aim Assist
mikehoncho wrote:it doesn't work. I keep getting this error
GPC error: cold war.gpc(28): syntax error, unexpected IDENTIFIER 'define'.
This is a titan one script, not titan two.
This one will work for titan two:
- Code: Select all
#include <titanone.gph>
//Posted by ivanrdd, a member of the device Community - https://device.com/forums
//Posted : Tuesday 6th of April, 2021 11:16 UTC
//Posted by Sweet_EviL, a member of the device Community - <a href="https://device.com/forums" target="_blank">https://device.com/forums</a>
//Posted : Sunday 9th of August, 2020 10:02 CST6CDT
//#################################################################################################
//######################################### Sweet_EviL_14 #########################################
//#################################################################################################
//# _________ __ ___________ .__.____ ____ _____ #
//# / _____/_ _ __ ____ _____/ |_ \_ _____/__ _|__| | /_ | / | | #
//# \_____ \\ \/ \/ // __ \_/ __ \ __\ | __)_\ \/ / | | | |/ | |_ #
//# / \\ /\ ___/\ ___/| | | \\ /| | |___ | / ^ / #
//# /_______ / \/\_/ \___ >\___ >__| /_______ / \_/ |__|_______ \ |___\____ | #
//# \/ \/ \/ \/ \/ |__| #
//# Big thanks to BATTS legitclouds and all BETA TESTER#
//#################################################################################################
//###################################### Sweet_EviL_14 V10.00 ######################################
//#################################################################################################
//#################################################################################################
//####################################### Script parameters ######################################
//#################################################################################################
//--Rapid Fire (L2 + DOWN)
int Rapid_Fire = FALSE;
//--Layout
define FIRE = PS4_R2; //change to R1 for flipped bumpers
define ADS = PS4_L2; //change to L1 for flipped bumpers
define SPRINT = PS4_L3;
define TACTICAL = PS4_SHARE; //change to L2 for flipped bumpers
define LETHAL = PS4_R1; //change to R2 for flipped bumpers
define PRONE = PS4_R3;
define MELEE = PS4_CIRCLE;
define JUMP = PS4_CROSS;
define VIB_A = RUMBLE_A; //Leave Alone
int AR,ARS,iswitch,AR_H,AR_I = 1; //Change 1 to -1 If you play with Inverted
//#################################################################################################
//
// State machine variable
//
int Current_State = 0;
//
define Jitter = 5;
define MAX_ITERATION = 2;
define Max_Magnitude = 30;
int Iteration = MAX_ITERATION;
//
//#################################################################################################
//######################################### Script variable #######################################
//#################################################################################################
//
// Dont't change!
//
int Magnitude = 0;
//
//#################################################################################################
//############################################# MAIN ##############################################
//#################################################################################################
//
main
{
//update main every 17ms = 10 + 7
vm_tctrl(17);
//--LT pulled
if(get_val(PS4_L2))
{
if (Current_State == 0)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 1);
set_val(TRACE_1, Magnitude);
Current_State++;
}
else if (Current_State == 1)
{
Iteration--;
if(Iteration == 0)
{
Current_State ++;
Iteration = MAX_ITERATION;
}
}
else if (Current_State == 2)
{
Magnitude = isqrt(pow((get_lval(PS4_RX) - get_val(PS4_RX)), 2)) + Jitter ;
set_val(TRACE_2, Magnitude);
//Applying CORRECTION
Aim_Assist(get_val(PS4_RX), get_lval(PS4_RX), Magnitude, 0);
Current_State++;
}
else if (Current_State == 3)
{
Iteration--;
if(Iteration == 0)
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
}
}
else //--LT not pulled
{
Current_State = 0;
Iteration = MAX_ITERATION;
}
if(get_val(ADS) && event_press(PS4_DOWN)) {
combo_run (vibrate);
Rapid_Fire=!Rapid_Fire;}
if (Rapid_Fire) {
if(get_val(FIRE)) {
combo_run (Rapiid_Fire);}}
if(get_val(PS4_L2) && event_press(PS4_RIGHT)) {
iswitch=!iswitch;}
if(!iswitch) {
AR = 28; //Vertical Anti Recoil Profile/Value 1
AR_H = -12; //Horizontal Anti Recoil Profile/Value 1
LED(0,0,2,0);}
if(iswitch) {
AR = 24; //Vertical Anti Recoil Profile/Value 2
AR_H = -2; //Horizontal Anti Recoil Profile/Value 2
LED(0,0,0,2);}
if(get_val(PS4_L2) && get_val(PS4_R2))
combo_run(cAR);
if(abs(get_val(PS4_RY)) > AR + 2 || abs(get_val(PS4_RX)) > AR + 2) {
combo_stop(cAR);}
deadzone(PS4_L2,PS4_L2,100,100);
}
//
//#################################################################################################
//############################################# FUNC ##############################################
//#################################################################################################
//
combo Rapiid_Fire {
set_val(FIRE, 100);
wait(40);
set_val(FIRE, 0);
wait(30);
}
combo vibrate {
set_rumble(RUMBLE_A, 85);
wait(225);
reset_rumble();
}
combo cAR {
ARS = get_val(PS4_RY) + AR;
if(ARS > 100) ARS = 100;
set_val(PS4_RY,ARS * AR_I);
ARS = get_val(PS4_RX) + AR_H;
if(ARS > 100) ARS = 100;
set_val(PS4_RX,ARS);}
function Aim_Assist( Actual_X, Last_X, Magnitude, Boost)
{
if (Magnitude < Max_Magnitude)
{
if (Last_X < Actual_X || Last_X == Actual_X)
{
//set_val(PS4_LX,(-30));
if (Boost)
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
}
else //--moving left
{
//set_val(PS4_LX,(30));
if (Boost)
{
set_val(PS4_RX, (Actual_X - Magnitude));
}
else
{
set_val(PS4_RX, (Actual_X + Magnitude));
}
}
}
}
function LED(a,b,c,d) {
set_led(LED_1,a);
set_led(LED_2,b);
set_led(LED_3,c);
set_led(LED_4,d);}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4533
- Joined: Wed May 22, 2019 5:39 am
4 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 101 guests