Script troubles doing a sequence n holding multiple buttons?
8 posts
• Page 1 of 1
Script troubles doing a sequence n holding multiple buttons?
So can someone clear up what wait actually does? Does it just wait for x ms or does it change a state of a key press set value?
I was under the impression for a key sequence I would have to do the following:
button press x
wait
button release x
wait
button press y
And for multiple buttons
button press x
button press y
wait
button release x
button release y
But that wasn't making the code happy at all. Any samples of a working button mash release sequence and multiple buttons press code would be helpful.
Thanks
I was under the impression for a key sequence I would have to do the following:
button press x
wait
button release x
wait
button press y
And for multiple buttons
button press x
button press y
wait
button release x
button release y
But that wasn't making the code happy at all. Any samples of a working button mash release sequence and multiple buttons press code would be helpful.
Thanks
-
kenshyn - Sergeant First Class
- Posts: 25
- Joined: Tue Jun 20, 2017 11:03 pm
Re: Script troubles doing a sequence n holding multiple butt
First wait under the press of button is the length in milliseconds that is held for and if a second wait is after that first it is a released state of the press!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Script troubles doing a sequence n holding multiple butt
Now you can press a button then wait then press another button then wait which the first button press only runs the length of wait and right away the next button is pressed to that wait length! So it will be one press after the other!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Script troubles doing a sequence n holding multiple butt
- Code: Select all
main
{
if(get_actual(BUTTON_8))combo_run(button_press);
}
combo button_press
{
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
}
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Script troubles doing a sequence n holding multiple butt
bonefisher wrote:
- Code: Select all
main
{
if(get_actual(BUTTON_8))combo_run(button_press);
}
combo button_press
{
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
set_val(BUTTON_17, 100.0);
set_val(BUTTON_14, 100.0);
wait(100);wait(100);
}
Thanks that all I needed appreciate the update I thought the sequence was
set_val(BUTTON_17, 100.0);
wait (100);
set_val(BUTTON_17, 0.0);
I was driving myself crazy lol.
-
kenshyn - Sergeant First Class
- Posts: 25
- Joined: Tue Jun 20, 2017 11:03 pm
Re: Script troubles doing a sequence n holding multiple butt
You can also do :
combo X_press
{
set_val(BUTTON_17, 100.0);
wait(100);
set_val(BUTTON_17, 0.0);
wait(100);
}
for looping or:
combo X_press
{
set_val(BUTTON_17, 100.0);
wait(100);
}
for event_active playing for 100ms.
combo X_press
{
set_val(BUTTON_17, 100.0);
wait(100);
set_val(BUTTON_17, 0.0);
wait(100);
}
for looping or:
combo X_press
{
set_val(BUTTON_17, 100.0);
wait(100);
}
for event_active playing for 100ms.
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Script troubles doing a sequence n holding multiple butt
I am always seeing the hold key Button_15 toggle into my sequence any way to lock that key out of the output? I tied setting it 0 ugh.
main
{
if(get_actual(BUTTON_15))combo_run(button_press);
}
combo button_press
{
set_val(BUTTON_15, 0);
set_val(BUTTON_5, 100.0);
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
}
main
{
if(get_actual(BUTTON_15))combo_run(button_press);
}
combo button_press
{
set_val(BUTTON_15, 0);
set_val(BUTTON_5, 100.0);
set_val(BUTTON_17, 100.0);
wait(100);wait(100);
}
-
kenshyn - Sergeant First Class
- Posts: 25
- Joined: Tue Jun 20, 2017 11:03 pm
Re: Script troubles doing a sequence n holding multiple butt
kenshyn wrote:I am always seeing the hold key Button_15 toggle into my sequence any way to lock that key out of the output? I tied setting it 0 ugh.
Fixed, BUTTON_15 will always be 0:
- Code: Select all
main {
if(get_actual(BUTTON_15)) {
set_val(BUTTON_15, 0.0);
combo_run(button_press);
}
}
combo button_press {
set_val(BUTTON_5, 100.0);
set_val(BUTTON_17, 100.0);
wait(100);
wait(100);
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 92 guests