Need a little extra help getting started

GPC script programming for Titan Two device. Code examples, how to, questions, requests.

Moderators: The_Rabid_Taco, pablosscripts, bonefisher

Need a little extra help getting started

Postby Titan101 » Sun Jul 14, 2019 10:17 am

While I've found some great examples on the User Manuel, I think a few more could really help me get going.

Using a PS4 controller:

1) If I press R1, then L1 is pressed 100 ms later.

2) If I press R1, then L1 is pressed 100 ms later, then L2 is pressed 100 ms after that.

3) If I press Triangle (it is read as being pressed first), then L1, L2, Circle, and Triangle are all pressed at the same time 100 ms after that; then L2, X, and Square are pressed at the same 100 ms after that; then L1, Circle and Triangle are pressed together 100 ms after that.

4) If I press Up on the D-Pad it is not recognized, Triangle is pressed instead, then L1, L2, Circle, and Triangle are all pressed at the same time 100 ms after that; then L2, X, and Square are pressed at the same 100 ms after that; then L1, Circle and Triangle are pressed together 100 ms after that.
If this it's not possible omit recognition of the D-Pad being pressed, that's fine, just let it be pressed along with Triangle

5) If I press right on the D-Pad, then the left thumbstick is held right for 2 seconds, then the left thumbstick is held up for 2 seconds, then the thumbstick is held left for 2 seconds.

6) If I hold R2 L2 is also held and L1 is pressed.

7) If I hold R2 L2 is also held and L1 is pressed, and X is tapped repeatedly.

8) If I press L1 it is recognized and X is tapped repeatedly for 5 seconds.

If I could get numbers 2, 3, and 8 in an actual working script, that would be excellent. If the script could be toggled on/off by pressing the D-Pad left, that would be amazing.
And is my script request even possible? Since L1 is used in all them, will pressing R1 trigger numbers 3) and 8)?

And you don't have to respond to the whole post, if you only have time to answer 1 or 2 it's much appreciated.

I feel like I'm asking alot.. if much of this isn't answered in 48 hours or so, PM me and we can work out a little compensation.
Last edited by Titan101 on Sun Jul 14, 2019 11:10 am, edited 2 times in total.
User avatar
Titan101
Sergeant
Sergeant
 
Posts: 7
Joined: Sat Jul 13, 2019 7:22 am

Re: Need a little extra help getting started

Postby Mad » Sun Jul 14, 2019 11:03 am

You may need to change some things, I tried to follow as best i could. I recommend checking out https://www.consoletuner.com/wiki/index ... _scripting
ConsoleTuner Support Team || Discord
Mad
Captain
Captain
 
Posts: 638
Joined: Wed May 22, 2019 5:39 am

Re: Need a little extra help getting started

Postby Titan101 » Sun Jul 14, 2019 11:13 am

Thanks so much! I did edit the post, probably while you where doing this. This is great, I appreciate it!
User avatar
Titan101
Sergeant
Sergeant
 
Posts: 7
Joined: Sat Jul 13, 2019 7:22 am

Re: Need a little extra help getting started

Postby Titan101 » Mon Jul 15, 2019 1:17 am

Ok, I'm struggling here.

If I press R1 it is recognized and X is tapped repeatedly for 5 seconds.

Could I get this in a working script please? (PS4)


Also, if I could get 1-7 in individual working scripts (see OP), I think it could really help me out.. I'm happy to compensate someone for their time, just PM me.

(Just so you know what you're dealing with here, I just spend hours working on stuff, only to find my Titan2 was unplugged from my PS4 the whole time)
User avatar
Titan101
Sergeant
Sergeant
 
Posts: 7
Joined: Sat Jul 13, 2019 7:22 am

Re: Need a little extra help getting started

Postby Mad » Mon Jul 15, 2019 2:03 am

1:

Code: Select all
main {
  if (event_active(BUTTON_4)) combo_run(One); // Press R1
}
 
combo One {
  wait(100); // Wait 100 ms
  set_val(BUTTON_7, 100); // Press L1
  wait(0);
}


2:

Code: Select all
main {
  if (event_active(BUTTON_4)) combo_run(One); // Press R1
}
 
combo One {
  wait(100); // Wait 100 ms
  set_val(BUTTON_7, 100); // Press L1
  wait(100); // Wait 100 ms
  set_val(BUTTON_8, 100); // Press L2
  wait(100);// Wait 100 ms
}


3:

Code: Select all
main {
  if (event_active(BUTTON_14)) combo_run(Two);    // Press Triangle
}
 
combo Two {
  wait(100); // Wait 100 ms
  set_val(BUTTON_7, 100); // Press L1
  set_val(BUTTON_8, 100); // Press L2
  set_val(BUTTON_15, 100); // Press Circle
  set_val(BUTTON_14, 100); // Press Triangle
  wait(100); // Wait 100 ms
  set_val(BUTTON_8, 100); // Press L2
  set_val(BUTTON_16, 100); // Press X
  set_val(BUTTON_17, 100); // Press Square
  wait(100); // Wait 100 ms
}


4:

Code: Select all
main {
  if (event_active(BUTTON_10)) combo_run(Three); // Dpad Up
}
 
combo Three {
  set_val(BUTTON_10, 0); // Block Dpad Up
  set_val(BUTTON_14, 100); // Press Triangle
  wait(100); // Wait 100 ms
  set_val(BUTTON_7, 100); // Press L1
  set_val(BUTTON_8, 100); // Press L2
  set_val(BUTTON_15, 100); // Press Circle
  set_val(BUTTON_14, 100); // Press Triangle
  wait(100); // Wait 100 ms
  set_val(BUTTON_8, 100); // Press L2
  set_val(BUTTON_16, 100); // Press X
  set_val(BUTTON_17, 100); // Press Square
  wait(100);
  set_val(BUTTON_7, 100); // Press L1
  set_val(BUTTON_15, 100); // Press Circle
  set_val(BUTTON_14, 100); // Press Triangle   
  wait(100);
}


5:

Code: Select all
main {
   if (event_active(BUTTON_13)) combo_run(Four); // Dpad Right
}
 
combo Four {
  set_val(STICK_2_X, 100); // Left stick right
  wait(2000); // Wait 2 seconds
  set_val(STICK_2_Y, -100); //Left stick up
  wait(2000); // Wait 2 seconds
  set_val(STICK_2_X, 100); // Left stick right
  wait(2000); // Wait 2 seconds
}


6:

Code: Select all
bool pressed;
 
main {
  if (get_actual(BUTTON_5)) { // R2
    set_val(BUTTON_8, 100); // Hold L2
    if(!pressed) { // Press L1
      set_val(BUTTON_7, 100);
      pressed = TRUE;
    }
  }
  if(event_release(BUTTON_5)) pressed = FALSE;
}


7:

Code: Select all
bool pressed;
 
main {
  if(get_actual(BUTTON_5)) {
    set_val(BUTTON_8, 100);
    if(!pressed) {
      set_val(BUTTON_7, 100);
      pressed = TRUE;
    }
    combo_run(Seven);
  }
  if(event_release(BUTTON_5)) pressed = FALSE;
}
 
combo Seven {
  set_val(BUTTON_16, 100);
  wait(40);
  set_val(BUTTON_16, 0);
  wait(40);
}


8:

Code: Select all
uint32 timer;
bool x;
 
main {
  if (event_active(BUTTON_7)) x = TRUE;
 
  if (x) {
    timer += elapsed_time();
 
    if(timer == 5000) {
      timer = 0;
      combo_stop(Example);
      x = FALSE;
    } else combo_run(Example);
  }
}
 
combo Example {
  set_val(BUTTON_16, 100);
  wait(40);
  set_val(BUTTON_16, 0);
  wait(40);
}
ConsoleTuner Support Team || Discord
Mad
Captain
Captain
 
Posts: 638
Joined: Wed May 22, 2019 5:39 am

Re: Need a little extra help getting started

Postby Titan101 » Mon Jul 15, 2019 2:08 am

This one works, thanks! I'm sure the one's in your first post work for you and everyone else, but like I said I'm struggling here. Which is why I want to pay someone to deal with me. I do have advanced degrees, so I'm not incompetent, but have zero programming experience.

Yes, I have ordered an SD card, maybe I'll have better luck with the recorder, thanks again.

*Edit - Oh wow, you did them all, thanks so much!
User avatar
Titan101
Sergeant
Sergeant
 
Posts: 7
Joined: Sat Jul 13, 2019 7:22 am

Re: Need a little extra help getting started

Postby Mad » Mon Jul 15, 2019 2:21 am

I made some changes to #6 and you're welcome.
ConsoleTuner Support Team || Discord
Mad
Captain
Captain
 
Posts: 638
Joined: Wed May 22, 2019 5:39 am


Return to GPC Script Programming (Titan Two)

Who is online

Users browsing this forum: No registered users and 5 guests