How do make a script keep pressing A for 20 min

GPC1 script programming for Titan One. Code examples, questions, requests.

How do make a script keep pressing A for 20 min

Postby Jas8585 » Fri Nov 23, 2018 6:17 am

How do make a script keep pressing A for 20 min or infinity Then press B to stop script

Thanks
User avatar
Jas8585
Sergeant First Class
Sergeant First Class
 
Posts: 19
Joined: Thu Feb 16, 2017 9:40 pm

Re: How do make a script keep pressing A for 20 min

Postby Sillyasskid » Fri Nov 23, 2018 7:41 am

Jas8585 wrote:How do make a script keep pressing A for 20 min or infinity Then press B to stop script

Thanks

Code: Select all
main {
  if (event_press(XB1_RS) && get_ptime(XB1_A) > 3000)
    combo_run(A_press);
 
 if(event_press(XB1_B))
    combo_stop(A_press);
  }
 
combo A_press {
    set_val(XB1_A, 100);
    wait(150);
    wait(150);
    combo_restart(A_press);
    wait(10);
}

This will do what you asked,

Too activate hold A for at least 3 seconds, then press the Right Thumb Stick. Let go of A after you have pressed the Right Thumb stick.

It will then continue to press A over and over, to stop the loop just press B.
User avatar
Sillyasskid
Captain
Captain
 
Posts: 574
Joined: Sat May 14, 2016 3:07 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 41 guests