Want this Aim Assist script triggers changed

GPC2 script programming for Titan Two. Code examples, questions, requests.

Want this Aim Assist script triggers changed

Postby ObnoxiousBoxes » Mon Feb 12, 2024 3:15 pm

Hi guys, currently this aim assist script is activated by pressing either L2 or R2. Would like it to be deactivated if there's any right stick input above 5%.

That way it will be active when I'm pre-aiming and when I actually move my crosshair it won't mess with my aim at all (and the rotational AA will kick in cause I'm moving my crosshair manually!). Any help appreciated.

Code: Select all
main {
  if(is_release(STICK_1_X)^^is_release(STICK_1_Y)) Delay=10;
  else Delay=20;
 
  c_AS = (is_active(BUTTON_8) || is_active(BUTTON_5));
}
 
combo c_AS {
  set_val(STICK_1_Y, f_a_f(STICK_1_Y, AP));
  wait(Delay);
  set_val(STICK_1_X, f_a_f(STICK_1_X, AP));
  wait(Delay);
  set_val(STICK_1_Y, f_a_f(STICK_1_Y, AM));
  wait(Delay);
  set_val(STICK_1_X, f_a_f(STICK_1_X, AM));
  wait(Delay-1);
  set_val(STICK_1_X, f_a_f(STICK_1_X, AM));
}
 
fix32 f_a_f(uint8 p, fix32 m) { return  (abs(get_val(p)) < Release) ? m : get_val(p); }
 
main {
  if(sqrt(sq(get_actual(STICK_1_X))+sq(get_actual(STICK_1_Y)))>90f){
    set_val(STICK_1_X, get_actual(STICK_1_X));
    set_val(STICK_1_Y, get_actual(STICK_1_Y));
  }
}
User avatar
ObnoxiousBoxes
Corporal
Corporal
 
Posts: 5
Joined: Tue Nov 21, 2023 5:31 pm

Re: Want this Aim Assist script triggers changed

Postby Mad » Mon Feb 19, 2024 6:30 am

Change this line:
Code: Select all
if(sqrt(sq(get_actual(STICK_1_X))+sq(get_actual(STICK_1_Y)))>90f){

to:
Code: Select all
if(sqrt(sq(get_actual(STICK_1_X))+sq(get_actual(STICK_1_Y)))>5f){
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4520
Joined: Wed May 22, 2019 5:39 am


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Google [Bot], WhytePuma and 20 guests