Combo (short for combination) is a term that designates a set of actions programmed to be automatically performed in sequence.
In addition to combos there are also macros.
Most of the time you will use a combo. Some reasons to do so:
You probably want to record and use a macro for:
Here is an incomplete list showing their different functionalty.
You can created a combo manually or you can use the macro recording of GTuner IV to record inputs and convert it to a combo as explained on this page.
A combo is defined using syntax such as the following:
combo SomeName { set_val(BUTTON_14, 100); // set BUTTON_14 to pressed wait(100); // press for 100ms set_val(BUTTON_14, 0); // set BUTTON_14 to released wait(100); // release for 100ms set_val(BUTTON_14, 100); // set BUTTON_14 to pressed set_val(BUTTON_15, 100); // set BUTTON_15 to pressed wait(250); // press both for 250ms wait(250); // wait 250ms, without any control states set by code }
To execute the combo above you need to use the combo_run(comboname) function.
Example to start it each time you press BUTTON_9:
main { if (event_active(BUTTON_9)) combo_run(SomeName); }
For complete examples click here and/or take a look at the Related Functions listed below.
wait(ms);
The wait command sets for how long the last set of actions (commands) must be execute. It's expressed in milliseconds and can range from 0 to 32767. wait
can be used within a combo only, not in main { }
or anywhere else.wait
cannot exist inside conditionals like if
.call(comboname);
Starts the execution of the combo comboname and waits for the called combo to finish before it continues the execution of the current combocall
can be used within a combo only, not in main { }
or anywhere else.call
cannot exist inside conditionals like if
.combo_stop(comboname);
Stop the execution of a combo.11)combo_restart(comboname);
Restart the execution of a combo.12)combo_pause(comboname);
Pause the execution of a combo.13)There are various pitfalls to watch out for when using combos.
wait(1);
might not be registered by the game as an input.wait(20);
.wait(0);
sectionATTENTION: The ffb_set() should NOT be called on every interaction of main
.combo Example { // section wait(0); begins here ffb_set(FFB_1,100.0,400); // rumble motor 1 full power for 400ms wait(0); // <-- section wait(0) ends here and wait(300) starts set_val(BUTTON_10,100); set_val(BUTTON_11,100); wait(300); // press BUTTON_10 and _11 for 300ms }
combo PressReleaseA { set_val(BUTTON_10,100); wait(300); // press BUTTON_10 for 300ms wait(300); // do nothing for 300ms } combo PressReleaseB { set_val(BUTTON_10,100); wait(300); // press BUTTON_10 for 300ms set_val(BUTTON_10,0); wait(300); // release BUTTON_10 for 300ms }