Help for a script

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

Help for a script

Postby salimkop » Fri Sep 20, 2019 6:31 pm

Hello,
I had a simple script that it was working, but it seams that something changed after an update of the software.

I want to do this succession of button :

BUTTON_16, BUTTON_16, BUTTON_10, BUTTON_13, BUTTON_3 AND again BUTTON_16

1 second for example between each button.

It looks easy, but i can't make it after my code not working anymore :)
User avatar
salimkop
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Mon Apr 16, 2018 2:04 pm

Re: Help for a script

Postby Scachi » Fri Sep 20, 2019 6:32 pm

Post your code. This can save us some time. Fixing it might be easier than writing something new.

Code: Select all
 
main {
    if (event_active(BUTTON_11)) combo_run(c1); // dpad_down to start the combo
}
 
combo c1 {
    set_val(BUTTON_11,0); // do not send tap of the starting button to the console
    set_val(BUTTON_16, 100);
    wait(950); wait(50); // hold 950ms , release 50ms
    set_val(BUTTON_16, 100);
    wait(950); wait(50);
    set_val(BUTTON_10, 100);
    wait(950); wait(50);
    set_val(BUTTON_13, 100);
    wait(950); wait(50);
    set_val(BUTTON_3, 100);
    wait(950); wait(50);
    set_val(BUTTON_16, 100);
    wait(950); wait(50);
}
 
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: Help for a script

Postby salimkop » Sat Sep 21, 2019 12:29 pm

Thanks, that's working :) next time i will put the code
User avatar
salimkop
Sergeant First Class
Sergeant First Class
 
Posts: 23
Joined: Mon Apr 16, 2018 2:04 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 127 guests