XB1 Elite Controller Multi-Combo's on Paddles
8 posts
• Page 1 of 1
XB1 Elite Controller Multi-Combo's on Paddles
With this script if you have a game which has lots of programmable actions you can assign eight of them to the paddles.
NB Thanks to those that assisted me. A short press (< 1 Sec) gives 1 action, a long press ((> 1 sec) gives you another action
NB Thanks to those that assisted me. A short press (< 1 Sec) gives 1 action, a long press ((> 1 sec) gives you another action
- Code: Select all
#pragma METAINFO("Elite Pad Multi-Combos V2.3", 2, 3 ,"[email protected]")
#include <xb1.gph> // for XB1
#define TRUE !FALSE
bool DetectShortP1 = FALSE;
bool DetectShortP2 = FALSE;
bool DetectShortP3 = FALSE;
bool DetectShortP4 = FALSE;
bool PressedReleasedP1 = FALSE;
bool PressedReleasedP2 = FALSE;
bool PressedReleasedP3 = FALSE;
bool PressedReleasedP4 = FALSE;
main {
//P1 Detection
if (get_actual(XB1_P1))
{
if (check_active(XB1_P1, 1000) && (!PressedReleasedP1))
{
PressedReleasedP1 = TRUE;
combo_run(LongP1);
}
else
{
DetectShortP1 = FALSE;
}
}
if ((event_release(XB1_P1) && (!LongP1) && (!PressedReleasedP1) ))
{
PressedReleasedP1 = TRUE;
combo_run(ShortP1);
}
// Detect Paddle release
if(is_release(XB1_P1))
{
PressedReleasedP1 = FALSE;
}
//P2 Detection
if (get_actual(XB1_P2))
{
if (check_active(XB1_P2, 1000) && (!PressedReleasedP2))
{
PressedReleasedP2 = TRUE;
combo_run(LongP2);
}
else
{
DetectShortP2 = FALSE;
}
}
if ((event_release(XB1_P2) && (!LongP2) && (!PressedReleasedP2) ))
{
PressedReleasedP2 = TRUE;
combo_run(ShortP2);
}
// Detect Paddle release
if(is_release(XB1_P2))
{
PressedReleasedP2 = FALSE;
}
//P3 Detection
if (get_actual(XB1_P3))
{
if (check_active(XB1_P3, 1000) && (!PressedReleasedP3))
{
PressedReleasedP3 = TRUE;
combo_run(LongP3);
}
else
{
DetectShortP3 = FALSE;
}
}
if ((event_release(XB1_P3) && (!LongP3) && (!PressedReleasedP3) ))
{
PressedReleasedP3 = TRUE;
combo_run(ShortP3);
}
// Detect Paddle release
if(is_release(XB1_P3))
{
PressedReleasedP3 = FALSE;
}
//P4 Detection
if (get_actual(XB1_P4))
{
if (check_active(XB1_P4, 1000) && (!PressedReleasedP4))
{
PressedReleasedP4 = TRUE;
combo_run(LongP4);
}
else
{
DetectShortP4 = FALSE;
}
}
if ((event_release(XB1_P4) && (!LongP4) && (!PressedReleasedP4) ))
{
PressedReleasedP4 = TRUE;
combo_run(ShortP4);
}
// Detect Paddle release
if(is_release(XB1_P4))
{
PressedReleasedP4 = FALSE;
}
}
//Begin region combo key presses
// 1. Combo for short P1 press
combo ShortP1 {
call(Time_Held_Print_P1);
set_val(XB1_Y, 100);
set_val(XB1_X, 100);
wait(70);
set_val(XB1_Y, 0);
set_val(XB1_X, 0);
printf("Short Wait P1");
}
// 2. Combo for long P1 press
combo LongP1 {
call(Time_Held_Print_P1);
set_val(XB1_Y, 100);
set_val(XB1_B, 100);
wait(70);
set_val(XB1_Y, 0);
set_val(XB1_B, 0);
printf("Long Wait P1");
}
// 3. Combo for short P2 press
combo ShortP2 {
call(Time_Held_Print_P2);
set_val(XB1_A, 100);
set_val(XB1_X, 100);
wait(70);
set_val(XB1_A, 0);
set_val(XB1_X, 0);
printf("Short Wait P2");
}
// 4. Combo for long P2 press
combo LongP2 {
call(Time_Held_Print_P2);
set_val(XB1_A, 100);
set_val(XB1_B, 100);
wait(70);
set_val(XB1_A, 0);
set_val(XB1_B, 0);
printf("Long Wait P2");
}
// 5. Combo for short P3 press
combo ShortP3 {
call(Time_Held_Print_P3);
set_val(XB1_Y, 100);
set_val(XB1_A, 100);
wait(70);
set_val(XB1_Y, 0);
set_val(XB1_A, 0);
printf("Short Wait P3");
}
// 6. Combo for long P3 press
combo LongP3 {
call(Time_Held_Print_P3);
set_val(XB1_X, 100);
set_val(XB1_B, 100);
wait(70);
set_val(XB1_X, 0);
set_val(XB1_B, 0);
printf("Long Wait P3");
}
// 7. Combo for short P4 press
combo ShortP4 {
call(Time_Held_Print_P4);
set_val(XB1_LS, 100);
set_val(XB1_A, 100);
wait(70);
set_val(XB1_LS, 0);
set_val(XB1_A, 0);
printf("Short Wait P4");
}
// 8. Combo for long P4 press
combo LongP4 {
call(Time_Held_Print_P4);
set_val(XB1_LS, 100);
set_val(XB1_B, 100);
wait(70);
set_val(XB1_LS, 0);
set_val(XB1_B, 0);
printf("Long Wait P4");
}
//End region combo key presses
//begin region debug output length of time the paddles are pressed
combo Time_Held_Print_P1 { // This combo will display the actual amount of time P1 was held.
printf("P1 Time Held: %d", (time_active(XB1_P1)));
}
combo Time_Held_Print_P2 { // This combo will display the actual amount of time P1 was held.
printf("P2 Time Held: %d", (time_active(XB1_P2)));
}
combo Time_Held_Print_P3 { // This combo will display the actual amount of time P1 was held.
printf("P3 Time Held: %d", (time_active(XB1_P3)));
}
combo Time_Held_Print_P4 { // This combo will display the actual amount of time P1 was held.
printf("P4 Time Held: %d", (time_active(XB1_P4)));
}
//end region debug
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
Awesome script! Thanks for sharing with us. Not sure if you have published it on the Online Resources (top menu -> tools -> publish), it would be very appreciated if you do. thanks.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
I am having trouble with it, it says bad username or password, I changed my password and copied and pasted username and password into GTunerIV :'(
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
Chaosrocket wrote:I am having trouble with it, it says bad username or password, I changed my password and copied and pasted username and password into GTunerIV :'(
have you changed you username in the past? if yes, it may be the reason you are not being able to login using Gtuner. Please let me know, so I can fix.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
Yes I have, I am unable to find the profile page to set my own password - TIA
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
Chaosrocket wrote:Yes I have, I am unable to find the profile page to set my own password - TIA
okay, I just checked your registration and everything related with your username seems to be correct, without inconsistencies. So I think that is not what is causing the login fail. Please try login again with Gtuner IV, make sure you enter the username and password with all correct hi/low case.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
I sorted it next logout Chaosrocket, But my remembered username in my browser ChaosRocket. Will publish now....
-
Chaosrocket - Sergeant Major
- Posts: 96
- Joined: Mon Jun 13, 2016 9:10 pm
Re: XB1 Elite Controller Multi-Combo's on Paddles
Chaosrocket wrote::oops: I sorted it next logout Chaosrocket, But my remembered username in my browser ChaosRocket. Will publish now....
glad to hear that.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 99 guests