Help with T2 Script

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

Help with T2 Script

Postby VvV » Sat Feb 16, 2019 6:23 am

I'm trying to figure out how to stop a combo from repeating itself once it's held down?

L2 (ADS_BTN) + L3 runs combo Build Wall but when i hold it down (even for a split second) it repeats itself which kinda messes me up

Is there a way I can make the combo execute only 1 time?

Code: Select all
 
    //Auto Build
     if (get_val(ADS_BTN) && get_val(PS4_L3)) {
       combo_run(BUILD_WALL);
 
       set_val(PS4_CIRCLE, 0);
       } else
       {combo_stop(BUILD_WALL);}


Code: Select all
combo BUILD_WALL {
    wait(20);
    wait(5);
    set_val(BUILD_BTN, 100);
    wait(40);
    wait(40);
    set_val(FIRE_BTN, 100);
    wait(40);
    wait(40);
    set_val(FIRE_BTN, 100);
    wait(90);
    wait(50);
} //end
 
User avatar
VvV
Sergeant Major
Sergeant Major
 
Posts: 87
Joined: Mon Jun 18, 2018 12:04 pm

Re: Help with T2 Script

Postby DontAtMe » Sat Feb 16, 2019 6:57 am

VvV wrote:Is there a way I can make the combo execute only 1 time?

Code: Select all
 //Auto Build
  if(is_active(ADS_BTN)) {
    if(event_active(PS4_L3)) combo_run(BUILD_WALL);
    if(BUILD_WALL) set_val(PS4_CIRCLE, 0);
  } else combo_stop(BUILD_WALL);
 

Try this
User avatar
DontAtMe
Captain
Captain
 
Posts: 502
Joined: Tue Oct 02, 2018 4:49 am

Re: Help with T2 Script

Postby VvV » Sat Feb 16, 2019 7:54 am

DontAtMe wrote:
VvV wrote:Is there a way I can make the combo execute only 1 time?

Code: Select all
 //Auto Build
  if(is_active(ADS_BTN)) {
    if(event_active(PS4_L3)) combo_run(BUILD_WALL);
    if(BUILD_WALL) set_val(PS4_CIRCLE, 0);
  } else combo_stop(BUILD_WALL);
 

Try this


Yes it works perfectly :smile0203:

Thanks for the quick response as well :joia:
User avatar
VvV
Sergeant Major
Sergeant Major
 
Posts: 87
Joined: Mon Jun 18, 2018 12:04 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: Baidu [Spider] and 115 guests