Help to get this be in a non stop loop
5 posts
• Page 1 of 1
Help to get this be in a non stop loop
set_val(BUTTON_5, 100.00);
set_val(BUTTON_9, 100.00);
set_val(BUTTON_15, 0.00);
set_val(BUTTON_16, 0.00);
set_val(STICK_1_X, -1.23);
set_val(STICK_1_Y, 3.83);
set_val(STICK_2_X, 83.42);
set_val(STICK_2_Y, 68.14);
wait(30);
set_val(BUTTON_15, 0.00);
wait(01);
set_val(BUTTON_16, 0.00);
I got this from my clipboard, i need to to be in a loop. The WAIT is i need 30 seconds before it hits bitton 15 then 1 second before button 16 then it can repeat. THANKS!
set_val(BUTTON_9, 100.00);
set_val(BUTTON_15, 0.00);
set_val(BUTTON_16, 0.00);
set_val(STICK_1_X, -1.23);
set_val(STICK_1_Y, 3.83);
set_val(STICK_2_X, 83.42);
set_val(STICK_2_Y, 68.14);
wait(30);
set_val(BUTTON_15, 0.00);
wait(01);
set_val(BUTTON_16, 0.00);
I got this from my clipboard, i need to to be in a loop. The WAIT is i need 30 seconds before it hits bitton 15 then 1 second before button 16 then it can repeat. THANKS!
-
Ninjaporchcats - Master Sergeant
- Posts: 29
- Joined: Thu Aug 09, 2018 10:04 pm
Re: Help to get this be in a non stop loop
You are missing a whole bunch of wait() functions I hope you realize that.
This code right here you provided will set all these Buttons to those values, for 30 milliseconds. all at once.
Because everything above the wait(30); Is going to be executed. for 30 milliseconds....
The number you use inside the wait functions are in milliseconds not seconds. So 30 seconds, is 30000, not 30.
And 1 second is 1000, not 01.
- Code: Select all
set_val(BUTTON_5, 100.00);
set_val(BUTTON_9, 100.00);
set_val(BUTTON_15, 0.00);
set_val(BUTTON_16, 0.00);
set_val(STICK_1_X, -1.23);
set_val(STICK_1_Y, 3.83);
set_val(STICK_2_X, 83.42);
set_val(STICK_2_Y, 68.14);
wait(30);
This code right here you provided will set all these Buttons to those values, for 30 milliseconds. all at once.
Because everything above the wait(30); Is going to be executed. for 30 milliseconds....
The number you use inside the wait functions are in milliseconds not seconds. So 30 seconds, is 30000, not 30.
And 1 second is 1000, not 01.
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Help to get this be in a non stop loop
A "combo" works like that:
all set_val/functions/code line from the beginning of the combo are repeated until the first wait(time) has elapsed.
Then is will repeat all the set_val/functions/code starting below this elapsed wait command and ending at the next wait command till this is elapsed..and so on until the last wait command is reached.
If you recorded that "clipboard" content from the macro recorder you can replay this macro directly.
Search the "Online Resource" in GTuner IV for "macro runner" by antithesis.
Download that script and put it into the same directory as your recorded macro .gmk file and rename your macro file to "Example.gmk"
Run the script and hold "LT/L2" and tap "RT/R2" to run it .
all set_val/functions/code line from the beginning of the combo are repeated until the first wait(time) has elapsed.
Then is will repeat all the set_val/functions/code starting below this elapsed wait command and ending at the next wait command till this is elapsed..and so on until the last wait command is reached.
If you recorded that "clipboard" content from the macro recorder you can replay this macro directly.
Search the "Online Resource" in GTuner IV for "macro runner" by antithesis.
Download that script and put it into the same directory as your recorded macro .gmk file and rename your macro file to "Example.gmk"
Run the script and hold "LT/L2" and tap "RT/R2" to run it .
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Help to get this be in a non stop loop
- Code: Select all
main {
if(event_active(BUTTON_16)) { // BUTTON A FOR XBOX
loop = !loop;
}
}
combo loop {
set_val(BUTTON_5, 100.00);
set_val(BUTTON_9, 100.00);
set_val(BUTTON_15, 0.00);
set_val(BUTTON_16, 0.00);
set_val(STICK_1_X, -1.23);
set_val(STICK_1_Y, 3.83);
set_val(STICK_2_X, 83.42);
set_val(STICK_2_Y, 68.14);
wait(30000);
set_val(BUTTON_15, 100.00);
wait(200);
wait(800);
set_val(BUTTON_16, 100.00);
wait(200);
combo_restart(loop);
wait(0);
}
If this is really how you want the combo to run, and stay in a loop. Here is the script.
Pressing A will activate the combo. To stop the combo just press A again.
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Help to get this be in a non stop loop
I will try this.., What i did was this, I hooked up a controller to my pc, hit record and did the movements with the controller that i would do in the game... All i want is the car to go backwards in a circle then i want the A button to get hit, then the Button, then repeat..
-
Ninjaporchcats - Master Sergeant
- Posts: 29
- Joined: Thu Aug 09, 2018 10:04 pm
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 80 guests