How can I get this simple script to stop?

Gtuner IV general support. Operation, questions, updates, feature request.

How can I get this simple script to stop?

Postby Maxxgold » Wed May 05, 2021 6:48 pm

It starts when I press down on the D-Pad, and I want it to stop after one revolution of Left, Up, Right. Any help would be appreciated, no hurry :innocent_smile_1:


Code: Select all
#include <ps5.gph>
 
bool toggle;
 
main {
    if(event_active(PS5_DOWN)) {
        toggle = !toggle;
    }
 
    if(toggle) combo_run(myCombo);
}
 
combo myCombo {
    set_val(PS5_LEFT, 100);
    wait(100);
    set_val(PS5_UP, 100);
    wait(100);
    set_val(PS5_RIGHT, 100);
    wait(100);   
}
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm

Re: How can I get this simple script to stop?

Postby Scachi » Wed May 05, 2021 7:10 pm

Code: Select all
#include <ps5.gph> 
main {
    if(event_active(PS5_DOWN)) combo_run(myCombo);
}
 
combo myCombo {
    set_val(PS5_LEFT, 100);
    wait(100);
    set_val(PS5_UP, 100);
    wait(100);
    set_val(PS5_RIGHT, 100);
    wait(100);   
}
Last edited by Scachi on Wed May 05, 2021 7:15 pm, edited 1 time in total.
User avatar
Scachi
Brigadier General
Brigadier General
 
Posts: 3044
Joined: Wed May 11, 2016 6:25 am
Location: Germany

Re: How can I get this simple script to stop?

Postby Maxxgold » Wed May 05, 2021 7:14 pm

Thank you!
User avatar
Maxxgold
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 265
Joined: Mon Aug 01, 2016 8:43 pm


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 85 guests