Keep button hold, but only one discrete press.

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

Keep button hold, but only one discrete press.

Postby SANTIAGUETEEEEE » Wed Aug 24, 2022 4:05 pm

Hello everyone!!
Honestly, I feel like a fool :roll: not being able to find in your huge forum the solution to a question as simple as this:
How can I achieve (in a script) that if I keep a button hold it only emits one discrete press?
I'm unable to resolve this issue.
Thank you for your help and for this great product that is the T2!!! :smile0202:
User avatar
SANTIAGUETEEEEE
Master Sergeant
Master Sergeant
 
Posts: 32
Joined: Wed Apr 24, 2019 4:10 pm

Re: Keep button hold, but only one discrete press.

Postby Mad » Tue Aug 30, 2022 7:33 am

Code: Select all
#define pressTime 60 // how long it should be pressed for in ms
main {
    if(check_active(BUTTON_16, pressTime)) {
        set_val(BUTTON_16, 0);
    }
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Keep button hold, but only one discrete press.

Postby SANTIAGUETEEEEE » Sat Sep 03, 2022 11:43 am

Mad wrote:
Code: Select all
#define pressTime 60 // how long it should be pressed for in ms
main {
    if(check_active(BUTTON_16, pressTime)) {
        set_val(BUTTON_16, 0);
    }
}


Thank you very much Mad!!!
This works very nice!!! :smile0517: :smile0517: :smile0208:
Cheers!!! :smile0201:
User avatar
SANTIAGUETEEEEE
Master Sergeant
Master Sergeant
 
Posts: 32
Joined: Wed Apr 24, 2019 4:10 pm


Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 36 guests