Disable specific inputs while a combo is running?

GPC1 script programming for Titan One. Code examples, questions, requests.

Disable specific inputs while a combo is running?

Postby vietnamesepheasant » Tue Oct 27, 2020 4:28 am

Hi there! Is there a way to disable specific inputs (for instance the right stick on a Switch Pro Controller, which shows up as SWITCH_RX for the x-axis and SWITCH_RY for the y-axis) only while a combo is running? Thank you!
User avatar
vietnamesepheasant
Sergeant
Sergeant
 
Posts: 6
Joined: Mon Oct 19, 2020 8:25 pm

Re: Disable specific inputs while a combo is running?

Postby Mad » Tue Oct 27, 2020 4:58 am

Hi,

Try this:
Code: Select all
main {
    if(combo_running(myCombo)) {
        set_val(SWITCH_RX, 0);
        set_val(SWITCH_RY, 0);
    }
}
 
combo myCombo {
 
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Disable specific inputs while a combo is running?

Postby vietnamesepheasant » Tue Oct 27, 2020 5:19 am

Thank you for the reply! I put that code in and it's still receiving inputs from SWITCH_RX and SWITCH_RY while the combo is running...interesting...
User avatar
vietnamesepheasant
Sergeant
Sergeant
 
Posts: 6
Joined: Mon Oct 19, 2020 8:25 pm

Re: Disable specific inputs while a combo is running?

Postby Mad » Tue Oct 27, 2020 7:55 am

Did you change this part:
Code: Select all
if(combo_running(myCombo)) {

myCombo should be changed to whatever your combo name is.

If you did that try this one instead, make sure block_input is the last combo in your script and to change myCombo.
Code: Select all
main {
    if(combo_running(myCombo)) {
        combo_run(block_input);
    }
}
 
combo myCombo { }
 
// must be last combo
combo block_input {
  set_val(SWITCH_RX, 0);
  set_val(SWITCH_RY, 0);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 94 guests