Possible Hold Lean 6 Siege?

Gtuner IV general support. Operation, questions, updates, feature request.

Possible Hold Lean 6 Siege?

Postby MonkeyDXim » Tue Oct 26, 2021 4:33 am

I'm not entirely sure how to write code for console tuner, but I was wondering of a way to implement hold lean through the script.
If right/left lean is pressed and held, it's pressed once. Then if it's released? : press the lean button again.
If while right lean is held, and left lean is pressed. It breaks the loop for right and vise versa. It just made sense in my head and thought this would work for holding lean instead of single pressing.
Can someone let me know if this is possible?
User avatar
MonkeyDXim
Private
Private
 
Posts: 1
Joined: Mon Aug 16, 2021 1:33 pm

Re: Possible Hold Lean 6 Siege?

Postby Mad » Mon Nov 01, 2021 10:33 pm

Sorted on Discord.

Code: Select all
#include <ps4.gph>
main {
  if (is_active(PS4_L2))
  {
    if (event_active(PS4_L3) || (event_release(PS4_L3) && time_active(PS4_L3) < time_active(PS4_R3))) { combo_run(leanLeft); }
    if (event_active(PS4_R3) || (event_release(PS4_R3) && time_active(PS4_R3) < time_active(PS4_L3))) { combo_run(leanRight); }
    set_val(PS4_L3, 0);
    set_val(PS4_R3, 0);
  }
}
combo leanLeft {
  set_val(PS4_L3, 100);
  wait(100);
  wait(100);
}
combo leanRight {
  set_val(PS4_R3, 100);
  wait(100);
  wait(100);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
Mad
Major General
Major General
 
Posts: 4533
Joined: Wed May 22, 2019 5:39 am


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 91 guests