Delay Between Button Presses
3 posts
• Page 1 of 1
Delay Between Button Presses
Hi,
How do I get a two second delay between button presses as per the code below? After RT pressed, I need to wait 2 seconds for an animation to complete before I press button X. Wait commands are for actual button press/release. How do I accomplish a delay before next button press/release? Do I define a delay and then refer to it in the combo sequence? Thanks very much.
How do I get a two second delay between button presses as per the code below? After RT pressed, I need to wait 2 seconds for an animation to complete before I press button X. Wait commands are for actual button press/release. How do I accomplish a delay before next button press/release? Do I define a delay and then refer to it in the combo sequence? Thanks very much.
- Code: Select all
combo ButtonSequence {
set_val(XB1_RT, 100);
wait(20);
wait(20);
//need to wait 2 sec here before the next button press executes
set_val(XB1_X, 100);
wait(50);
wait(50);
- titanone_fan
- First Sergeant
- Posts: 57
- Joined: Mon Aug 22, 2016 3:04 pm
Re: Delay Between Button Presses
the wait command is in milliseconds, therefore, "wait(2000)" would be wait for 2000 milliseconds which equals 2 seconds.
- Code: Select all
combo ButtonSequence {
set_val(XB1_RT, 100);
wait(20);
wait(20);
wait(2000);//need to wait 2 sec here before the next button press executes
set_val(XB1_X, 100);
wait(50);
wait(50);
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Delay Between Button Presses
Thank you!
- titanone_fan
- First Sergeant
- Posts: 57
- Joined: Mon Aug 22, 2016 3:04 pm
3 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: midg3t2 and 72 guests