Simple Script Requests

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

Simple Script Requests

Postby Jaedric » Mon Oct 22, 2018 6:07 am

Hi,

Can someone help with a simple script request, this is for the PS4.

Script #1:
1. Presses X for 3 seconds.
2. Loop back to step 1.
3. Press O to stop loop.

Script #2:
1. Presses Square for 3 seconds.
2. Loop back to step 1.
3. Press O to stop loop.

Thanks!
User avatar
Jaedric
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Oct 22, 2018 6:02 am

Re: Simple Script Requests

Postby J2Kbr » Mon Oct 22, 2018 9:06 pm

Welcome to our forums.

Script 1:
Code: Select all
int toggle;
 
main {
    // 3. Press O to start/stop loop.
    if(event_press(PS4_CIRCLE)) {
        toggle = !toggle;
    }
    if(toggle) {
        // 2. Loop back to step 1.
        combo_run(MyCombo);
    } else combo_stop(MyCombo);
}
 
combo MyCombo {
    // 1. Presses X for 3 seconds.
    set_val(PS4_CROSS, 100);
    wait(3000);
    wait(500);
}
 


Script 2:
Code: Select all
int toggle;
 
main {
    // 3. Press O to start/stop loop.
    if(event_press(PS4_CIRCLE)) {
        toggle = !toggle;
    }
    if(toggle) {
        // 2. Loop back to step 1.
        combo_run(MyCombo);
    } else combo_stop(MyCombo);
}
 
combo MyCombo {
    // 1. Presses X for 3 seconds.
    set_val(PS4_SQUARE, 100);
    wait(3000);
    wait(500);
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Simple Script Requests

Postby Jaedric » Tue Oct 23, 2018 7:19 am

Thanks, these worked great.
User avatar
Jaedric
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Oct 22, 2018 6:02 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 66 guests