Want this aim assist script always active rather than L2/R2

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

Want this aim assist script always active rather than L2/R2

Postby TheBruhhh » Tue Jul 12, 2022 3:14 pm

Hi, I have this script which I've been using for a while, but I want to try it just active all the time rather than only being active while L2 or R2 are pressed. 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
TheBruhhh
First Sergeant
First Sergeant
 
Posts: 65
Joined: Sun Nov 24, 2019 1:28 pm

Re: Want this aim assist script always active rather than L2

Postby TheBruhhh » Wed Jul 13, 2022 4:38 pm

Damn, 30 views and no reply, must be way more complex than I thought it would be :cry:
User avatar
TheBruhhh
First Sergeant
First Sergeant
 
Posts: 65
Joined: Sun Nov 24, 2019 1:28 pm

Re: Want this aim assist script always active rather than L2

Postby Scachi » Wed Jul 13, 2022 5:48 pm

when you want to run the combo all the time
one way is to change line:
c_AS = (is_active(BUTTON_8) || is_active(BUTTON_5));
to:
combo_run(c_AS);
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Want this aim assist script always active rather than L2

Postby TheBruhhh » Fri Jul 15, 2022 8:16 pm

Thank you very much bro! Sorry for late reply, busy busy week
User avatar
TheBruhhh
First Sergeant
First Sergeant
 
Posts: 65
Joined: Sun Nov 24, 2019 1:28 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 126 guests