Can someone help me program the following?

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

Can someone help me program the following?

Postby riribibi » Tue Oct 22, 2019 2:10 am

Hey guys, i have a basic programming knowledge for the t2 but am struggling mightly doing the following:

1) Hold RT and flick the LS Up+Right (twice), let go of everything briefly, then hold RT and flick the RS Down+Left shortly followed but not exact same time by LS UP+Left. Let go of everything briefly again then hold RT + RS down

2) Hold RT and flick the RS to the right, while still holding RT then flight the RS to the left, briefly let go of everything then hold RT and Flick RS Dwn+Right shortly follwed by LS up+Right

can someone please help me out? it would be greatly appreciated thank you
User avatar
riribibi
Command Sergeant Major
Command Sergeant Major
 
Posts: 134
Joined: Fri Oct 31, 2014 12:33 pm

Re: Can someone help me program the following?

Postby Mad » Tue Oct 22, 2019 3:19 am

Code: Select all
#include <xb1.gph>
 
#define hold_time 60 // Adjust hold time in ms
 
main {
 if(event_active(XB1_UP)) combo_run(c1); // Dpad up for combo 1
 if(event_active(XB1_DOWN)) combo_run(c2); // Dpad down for combo 2
 
}
 
combo c1 {
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LY, -100); // Left stick UP
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LX, 100); // Left stick RIGHT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LY, -100); // Left stick UP
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LX, 100); // Left stick RIGHT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RY, 100); // Right stick DOWN
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RX, -100); // Right stick LEFT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LY, -100); // Left stick UP
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LX, -100); // Left stick LEFT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RY, 100); // Right stick DOWN
  wait(hold_time);
}
 
combo c2 {
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RX, 100); // Right stick RIGHT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RX, -100); // Right stick LEFT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RY, 100); // Right stick DOWN
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_RX, 100); // Right stick RIGHT
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LY, -100); // Left stick UP
  wait(hold_time);
  set_val(XB1_RT, 100); // Hold RT
  set_val(XB1_LX, 100); // Left stick RIGHT
  wait(hold_time);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Can someone help me program the following?

Postby riribibi » Thu Nov 07, 2019 5:49 am

sorry for the late response but wanted to thank you very much for your help.
User avatar
riribibi
Command Sergeant Major
Command Sergeant Major
 
Posts: 134
Joined: Fri Oct 31, 2014 12:33 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 62 guests