Nintendo Switch Ignoring Inputs after First Button Press

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

Nintendo Switch Ignoring Inputs after First Button Press

Postby WillTheLion » Wed Nov 22, 2017 5:04 am

Hi there everyone. I saw that the Titan One received and update for the Nintendo Switch so I decided to give it a try.

I tried to make a basic script that just walks left and right over and over again while simulataneously pressing the 'A' button repeatedly.

I have it set up so that it runs the combo while I hold the R button as according to this tutorial thread here: viewtopic.php?f=18&t=5873#p43523

The problem is the game responds upon my pressing of the R button with the first button input in the combo. But then the game ignores all future inputs after that while the R button is held. This means anything else written in the combo as well as any buttons I press manually on the controller while holding the R button.

I didn't know if this was a glitch in the new Titan One firmware update, or if I made a mistake in my coding. Either way I figured posting for help might help shine light on a potential problem with the Switch update or at least fix a problem with my coding.

I can see in the Device Monitor that it is indeed pressing the buttons exactly how I want it to. But the game doesn't seem to recognize them.

Here's my script:

Code: Select all
/* *
* GPC SCRIPT
*
*  GPC is a scripting language with C-like syntax.
*  To learn more access GPC Language Reference on Help menu.
* *********************************************************** */

 
main {
    if(get_val(SWITCH_R)) {
        combo_run(Mycombo);
    }
}
 
combo Mycombo {
    set_val(SWITCH_LEFT, 100);
    wait(100);
    set_val(SWITCH_A, 100);
    wait(100);
    set_val(SWITCH_LEFT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(PS4_CIRCLE, 100);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
}
 



Anyone have any advice? If it helps I'm using the Pro Controller and yes I have the wired pro controller option enabled in system settings. I can play with it attached, it just seems scripts aren't working.

On a side note the PS4 controller plays games perfectly on the Switch! :smile0517:
User avatar
WillTheLion
Sergeant
Sergeant
 
Posts: 7
Joined: Fri Feb 03, 2017 12:16 am

Re: Nintendo Switch Ignoring Inputs after First Button Press

Postby J2Kbr » Wed Nov 22, 2017 4:24 pm

Thank you for your feedback on the Nintendo Switch support.

Please check if the change I made in your code makes it behave as your expect. :smile0517:
Code: Select all
/* *
* GPC SCRIPT
*
*  GPC is a scripting language with C-like syntax.
*  To learn more access GPC Language Reference on Help menu.
* *********************************************************** */

 
main {
    if(get_val(SWITCH_R)) {
        combo_run(Mycombo);
        set_val(SWITCH_R, 0);
    }
}
 
combo Mycombo {
    set_val(SWITCH_LEFT, 100);
    wait(100);
    set_val(SWITCH_A, 100);
    wait(100);
    set_val(SWITCH_LEFT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(PS4_CIRCLE, 100);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: Nintendo Switch Ignoring Inputs after First Button Press

Postby WillTheLion » Wed Dec 20, 2017 9:56 am

Thanks for the response. I'll test this in the next 24 hours to let you know how it went. I was able to do what I wanted with the Game Rec plugin even though it's less convenient. So I ended up doing what I was trying to do and then moved on to the next task in the game. I'll go take some time to try it out now. Sorry for the super long wait for a reply. Just been a busy month.
User avatar
WillTheLion
Sergeant
Sergeant
 
Posts: 7
Joined: Fri Feb 03, 2017 12:16 am

Re: Nintendo Switch Ignoring Inputs after First Button Press

Postby WillTheLion » Wed Dec 20, 2017 11:57 pm

J2Kbr wrote:...
I tried it with your edits and it sorta works. It now moves left and right when I hold the R button down but it doesn't press the A button at all even though Console Tuner says it's pressing it. Any idea why?
User avatar
WillTheLion
Sergeant
Sergeant
 
Posts: 7
Joined: Fri Feb 03, 2017 12:16 am

Re: Nintendo Switch Ignoring Inputs after First Button Press

Postby J2Kbr » Thu Dec 21, 2017 4:25 pm

perhaps it is just a timing issue, please check if the change I made in the combo results in the behavior you are looking for.

Code: Select all
/* *
* GPC SCRIPT
*
*  GPC is a scripting language with C-like syntax.
*  To learn more access GPC Language Reference on Help menu.
* *********************************************************** */

 
main {
    if(get_val(SWITCH_R)) {
        combo_run(Mycombo);
        set_val(SWITCH_R, 0);
    }
}
 
combo Mycombo {
    set_val(SWITCH_LEFT, 100);
    wait(100);
    wait(100);
    set_val(SWITCH_A, 100);
    wait(100);
    set_val(SWITCH_LEFT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(PS4_CIRCLE, 100);
    wait(100);
    set_val(SWITCH_RIGHT, 100);
    wait(100);
    set_val(SWITCH_A, 0);
    wait(100);
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 80 guests