Starting, stopping, and testing combos
Control named combo instances from main and avoid restarting an active sequence every loop.
Overview
Combo control functions let main start, stop, restart, or query a declared timed sequence. Edge-triggered starts usually produce clearer behavior than level-triggered starts.
A combo name is a compile-time symbol, not a string. Use the official function details to confirm restart behavior for the current runtime.
Key facts
- combo_run starts a declared combo.
- combo_stop stops a declared combo.
- A running-state check prevents accidental repeated starts.
- Combo control is separate from the combo-only call command.
GPC syntax examples
Examples are intentionally small. Replace identifiers only with values documented for your target.
main {
if (event_press(XB1_A) && !combo_running(Tap)) {
combo_run(Tap);
}
}
combo Tap {
set_val(XB1_A, 100);
wait(40);
}Functions, commands, and terms
Names below are catalog entries, not guessed signatures. Open the official sources for current parameter and return-value details.
combo_runfunction · Zen and PlusStarts a named combo.
combo_runningfunction · Zen and PlusReports whether a named combo is active.
combo_stopfunction · Zen and PlusStops a named combo.
combo_restartfunction · Zen and PlusRestarts a named combo.
combo_suspendfunction · Zen and PlusSuspends a named combo.
combo_suspendedfunction · Zen and PlusReports whether a named combo is suspended.
combo_current_stepfunction · Zen onlyReturns the current step of a named combo.
combo_step_time_leftfunction · Zen onlyReturns the time remaining in a combo's current step.
combo_stop_allfunction · Zen onlyStops all running combos.
combo_suspend_allfunction · Zen onlySuspends all running combos.
combo_resumefunction · Zen onlyResumes a suspended named combo.
combo_resume_allfunction · Zen onlyResumes all suspended combos.
Common mistakes
Starting the same combo on every held-input cycle.
Passing a quoted combo name.
Confusing call with combo_run.
Official GPC sources
Use these first-party references to confirm exact syntax and runtime behavior for your installed firmware and Studio version.
Related GPC references
Author timed first-level combo steps with legal wait durations and compose sequences with combo-only call.
Input and outputController input and output functionsRead current, physical, and prior values; detect transitions; write outputs; and understand when script changes affect later reads.
Executioninit and main execution modelKnow what runs once, what loops, and why blocking or one-time work belongs in the correct execution block.