Can't find how to hold left stick x down in Nintendo Switch.
6 posts
• Page 1 of 1
Can't find how to hold left stick x down in Nintendo Switch.
- Code: Select all
#pragma METAINFO("grind1", 1, 0, "<author_name>")
#include <titanone.gph>
int onoff = FALSE;
main {
if(event_press(BUTTON_7)) {
onoff = !onoff;
}
if(onoff) {
combo_run(FF7);
combo_run(FF72);
}
}
combo FF7 {
set_val(STICK_2_X,-100);
wait(100);
wait(10);
}
combo FF72 {
set_val(SWITCH_A,100);
wait(100);
wait(10);
}
This is what I got. I can get it to do SWITCH_RIGHT but I need the stick and not the right button. Anyone know what to do to hold down the switch's left analog stick?
-
Endless - Master Sergeant
- Posts: 38
- Joined: Thu May 02, 2019 1:06 am
Re: Can't find how to hold left stick x down in Nintendo Swi
So left stick right?
change:
if you want it held down the entire time the toggle is on just put it inside onoff instead of a combo.
change:
- Code: Select all
set_val(STICK_2_X,-100);
- Code: Select all
set_val(STICK_2_X,100);
if you want it held down the entire time the toggle is on just put it inside onoff instead of a combo.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
Re: Can't find how to hold left stick x down in Nintendo Swi
@Mad
For some reason this is not pressing the left stick. Under device monitor it says it is pressing Accel_1_z. I have the code for the previous version of the Titan. What is the TitanOne left stick command?
https://pasteboard.co/JrWxcB5.jpg
Please take a look at the image and attempt to compile this. If it is the same for both of us then it is a bug.
For some reason this is not pressing the left stick. Under device monitor it says it is pressing Accel_1_z. I have the code for the previous version of the Titan. What is the TitanOne left stick command?
- Code: Select all
#include <titanone.gph>
int onoff = FALSE;
main {
if(event_press(BUTTON_7)) {
onoff = !onoff;
}
if(onoff) {
set_val(STICK_2_X,-100);
combo_run(FF72);
}
}
combo FF72 {
set_val(SWITCH_A,100);
wait(100);
wait(10);
}
https://pasteboard.co/JrWxcB5.jpg
Please take a look at the image and attempt to compile this. If it is the same for both of us then it is a bug.
-
Endless - Master Sergeant
- Posts: 38
- Joined: Thu May 02, 2019 1:06 am
Re: Can't find how to hold left stick x down in Nintendo Swi
please try this if it works correctly:
- Code: Select all
#include <switch.gph>
int onoff = FALSE;
main {
if(event_active(BUTTON_7)) {
onoff = !onoff;
}
if(onoff) {
set_val(STICK_2_X,-100);
combo_run(FF72);
}
}
combo FF72 {
set_val(SWITCH_A,100);
wait(100);
wait(10);
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Can't find how to hold left stick x down in Nintendo Swi
I have no idea what you changed but it works perfectly. Thanks so much!
Oh, I just did a comparison and it was including the switch.ghp. That's great.
Oh, I just did a comparison and it was including the switch.ghp. That's great.
-
Endless - Master Sergeant
- Posts: 38
- Joined: Thu May 02, 2019 1:06 am
Re: Can't find how to hold left stick x down in Nintendo Swi
Endless wrote:I have no idea what you changed but it works perfectly. Thanks so much!
Oh, I just did a comparison and it was including the switch.ghp. That's great.
I did remove the titanone.gph and added the switch.gph instead and changed event_press to event_active to use gpc2 code only.
mixing t1 and T2 code using the titanone.gph header tends to mess up the output controls, resulting in being different buttons/sticks pressed then you want to.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
6 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 79 guests