Program a button push every 5 seconds

GPC2 script programming for Titan Two. Code examples, questions, requests.

Program a button push every 5 seconds

Postby Kendallb183 » Thu Sep 29, 2022 5:24 pm

I'm looking to be able to map a button let's say my Y button every 5 seconds for diablo 3 on the nintendo switch. Is this possible and how would I do it.
User avatar
Kendallb183
Corporal
Corporal
 
Posts: 4
Joined: Thu Sep 29, 2022 5:22 pm

Re: Program a button push every 5 seconds

Postby Mad » Thu Sep 29, 2022 7:00 pm

Code: Select all
main { combo_run(pressY); }
 
combo pressY {
    set_val(BUTTON_17, 100);
    wait(60);
    wait(5000);
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Program a button push every 5 seconds

Postby Kendallb183 » Thu Sep 29, 2022 7:15 pm

Mad wrote:
Code: Select all
main { combo_run(pressY); }
 
combo pressY {
    set_val(BUTTON_17, 100);
    wait(60);
    wait(5000);
}



Where can I learn how to write this myself? Or would I need to post here everytime I needed a new script? I don't want to have to have a degree in coding to use a device I guess
User avatar
Kendallb183
Corporal
Corporal
 
Posts: 4
Joined: Thu Sep 29, 2022 5:22 pm

Re: Program a button push every 5 seconds

Postby Mad » Thu Sep 29, 2022 7:19 pm

ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
Mad
Major General
Major General
 
Posts: 4536
Joined: Wed May 22, 2019 5:39 am

Re: Program a button push every 5 seconds

Postby Kendallb183 » Thu Sep 29, 2022 7:39 pm

Mad wrote:https://www.consoletuner.com/wiki/index.php?id=t2:gpc_scripting

I read the wiki and some examples but it doesn't explain how to write your own functions. It gives examples of different functions but it never kinda goes into explaining if you want to map this button you need to say "xyz" and after that you input a value between 0-100, and you have to make sure to use [] before and after.

It says in the wiki the language is a lot like writing C programming. I don't mind watching a full YouTube videos to learn how to write basic script for this device, I think that would be cool... but I don't want to learn a whole computer language to use this device either. So, the wiki gives examples but doesn't really teach. Are there youtube videos you know of that actually teach how to code for this device? Or similar. For someone with no knowledge owledge of how to code whatsoever ever.
User avatar
Kendallb183
Corporal
Corporal
 
Posts: 4
Joined: Thu Sep 29, 2022 5:22 pm

Re: Program a button push every 5 seconds

Postby Kendallb183 » Thu Sep 29, 2022 8:08 pm

Mad wrote:https://www.consoletuner.com/wiki/index.php?id=t2:gpc_scripting


Also, will this also work on titan one? There's no titan 2s on amazon, just titan 1
User avatar
Kendallb183
Corporal
Corporal
 
Posts: 4
Joined: Thu Sep 29, 2022 5:22 pm


Return to GPC2 Script Programming

Who is online

Users browsing this forum: No registered users and 123 guests

cron