Accessible Script Requests for Disabled Users
Re: Accessible Script Requests for Disabled Users
Let me know if this works as intended, You had 2 scripts above so i was unsure which you needed.
- Code: Select all
int modtoggle=TRUE;
main {
if(get_val(XB1_VIEW) && get_ptime(XB1_VIEW) > 5000) {
modtoggle = !modtoggle;
}
if(!modtoggle) {
if(event_press(PS3_L1)) {
if((get_val(TRACE_1)) != 1) {
set_val(TRACE_1, 1);
} else if((get_val(TRACE_1)) == 1) {
set_val(TRACE_1, 0);
}
}
if((get_val(TRACE_1)) == 1) {
set_val(PS3_L1, 100);
}
if(get_val(PS3_R1)) {
set_val(PS3_L1, 100);
}
if((get_val(PS3_LY)) < -95) {
set_val(PS3_R2, 100);
}
if((get_val(PS3_LY)) > 95) {
set_val(PS3_L2, 100);
}
if(event_press(PS3_L3)) {
if((get_val(TRACE_2)) != 1) {
set_val(TRACE_2, 1);
} else if((get_val(TRACE_2)) == 1) {
set_val(TRACE_2, 0);
}
}
if((get_val(TRACE_2)) == 1) {
set_val(PS3_R2, 100);
}
}
}
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
-
AKHUGHES90 - Major
- Posts: 927
- Joined: Mon Nov 24, 2014 12:19 am
- Location: Springfield, IL USA CST (-6:00)
Re: Accessible Script Requests for Disabled Users
Hi AKHUGHES90.
The two functions are working, I have not been able to do is disable and enable functions during the game by pressing the select button for 5 seconds. I made a change, but I still did not work ... trying ... if I can, notice here, ok ...
The two functions are working, I have not been able to do is disable and enable functions during the game by pressing the select button for 5 seconds. I made a change, but I still did not work ... trying ... if I can, notice here, ok ...
-
cdanv - Master Sergeant
- Posts: 29
- Joined: Thu Aug 20, 2015 5:05 am
Re: Accessible Script Requests for Disabled Users
cdanv wrote:Hi AKHUGHES90.
The two functions are working, I have not been able to do is disable and enable functions during the game by pressing the select button for 5 seconds. I made a change, but I still did not work ... trying ... if I can, notice here, ok ...
I edited the above code if you want to give it another try.
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
-
AKHUGHES90 - Major
- Posts: 927
- Joined: Mon Nov 24, 2014 12:19 am
- Location: Springfield, IL USA CST (-6:00)
Re: Accessible Script Requests for Disabled Users
Yes. I am very grateful
as soon as possible, leave here for me ... thanks
as soon as possible, leave here for me ... thanks
-
cdanv - Master Sergeant
- Posts: 29
- Joined: Thu Aug 20, 2015 5:05 am
Re: Accessible Script Requests for Disabled Users
Hi, AKHUGHES90
J2Kbr made some changes that contributed enough ... now the command is responding perfectly. Is following to share. thank you (AKHUGHES90; J2Kbr)
J2Kbr made some changes that contributed enough ... now the command is responding perfectly. Is following to share. thank you (AKHUGHES90; J2Kbr)
- Code: Select all
int toggle = TRUE;
int toggle_ctrl;
init {
ledFeedback();
}
main {
if(toggle_ctrl) {
if(event_release(PS3_SELECT)) toggle_ctrl = FALSE;
} else if(get_val(PS3_SELECT) && get_ptime(PS3_SELECT) >= 3000) {
toggle_ctrl = TRUE;
toggle = !toggle;
ledFeedback();
}
if(toggle) {
if(event_press(PS3_L1)) {
if(get_val(TRACE_1) != 1) {
set_val(TRACE_1, 1);
} else if(get_val(TRACE_1) == 1) {
set_val(TRACE_1, 0);
}
}
if(get_val(TRACE_1) == 1) {
set_val(PS3_L1, 100);
}
if(get_val(PS3_R1)) {
set_val(PS3_L1, 100);
}
if(get_val(PS3_LY) < -95) {
set_val(PS3_R2, 100);
}
if(get_val(PS3_LY) > 95) {
set_val(PS3_L2, 100);
}
if(event_press(PS3_L3)) {
if(get_val(TRACE_2) != 1) {
set_val(TRACE_2, 1);
} else if(get_val(TRACE_2) == 1) {
set_val(TRACE_2, 0);
}
}
if(get_val(TRACE_2) == 1) {
set_val(PS3_R2, 100);
}
}
}
function ledFeedback() {
if(toggle) set_ledx(LED_4, 0);
else set_ledx(LED_1, 0);
}
-
cdanv - Master Sergeant
- Posts: 29
- Joined: Thu Aug 20, 2015 5:05 am
Re: Accessible Script Requests for Disabled Users
Awesome!! Thanks for the feedback!!
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Accessible Script Requests for Disabled Users
Hi all,
I'm looking to boost the power of a person using a single joystick and buttons. The joystick could be something like an analogue Xbox 360 thumb-stick, or a Mayflash Arcade Stick. I'd like for them to be able to flick between three profiles using this process:
HOLD START + LEFT (LEFT-STICK acts as LEFT-STICK)
HOLD START + UP (LEFT-STICK acts as D-PAD)
HOLD START + RIGHT (RIGHT-STICK acts as RIGHT-STICK)
HOLD START + DOWN (MOVE down through the profiles, much as you can do with SELECT+XBOX/PS button).
(TAP START = START AS NORMAL..... HOLD START + something else - swallow START - so it's not passed through.)
I've got this far....
PROFILE 1 (LEFT-STICK) = blank
PROFILE 2 (D-PAD MODE) =
if(get_val(XB360_LY) < -20 ) set_val(XB360_UP,100);
if(get_val(XB360_LY) > 20 ) set_val(XB360_DOWN,100);set_val(XB360_LY,0);
if(get_val(XB360_LX) < -20 ) set_val(XB360_LEFT,100);
if(get_val(XB360_LX) > 20 ) set_val(XB360_RIGHT,100);set_val(XB360_LX,0);
PROFILE 3 (RIGHT-STICK) =
remap XB360_LX -> XB360_RX;
remap XB360_LY -> XB360_RY;
remap XB360_RX -> XB360_LX;
remap XB360_RY -> XB360_LY;
But I'm not sure how to switch profiles in this way. If possible, it would be handy for the arcade stick, if you could also hold START and press R1 or R2 to get "R3" and likewise, L1 or L2 to get "L3".
If anyone could help, I'd be really appreciative. Absolutely love what's possible with the Titan One. Brilliant device.
Barrie
I'm looking to boost the power of a person using a single joystick and buttons. The joystick could be something like an analogue Xbox 360 thumb-stick, or a Mayflash Arcade Stick. I'd like for them to be able to flick between three profiles using this process:
HOLD START + LEFT (LEFT-STICK acts as LEFT-STICK)
HOLD START + UP (LEFT-STICK acts as D-PAD)
HOLD START + RIGHT (RIGHT-STICK acts as RIGHT-STICK)
HOLD START + DOWN (MOVE down through the profiles, much as you can do with SELECT+XBOX/PS button).
(TAP START = START AS NORMAL..... HOLD START + something else - swallow START - so it's not passed through.)
I've got this far....
PROFILE 1 (LEFT-STICK) = blank
PROFILE 2 (D-PAD MODE) =
if(get_val(XB360_LY) < -20 ) set_val(XB360_UP,100);
if(get_val(XB360_LY) > 20 ) set_val(XB360_DOWN,100);set_val(XB360_LY,0);
if(get_val(XB360_LX) < -20 ) set_val(XB360_LEFT,100);
if(get_val(XB360_LX) > 20 ) set_val(XB360_RIGHT,100);set_val(XB360_LX,0);
PROFILE 3 (RIGHT-STICK) =
remap XB360_LX -> XB360_RX;
remap XB360_LY -> XB360_RY;
remap XB360_RX -> XB360_LX;
remap XB360_RY -> XB360_LY;
But I'm not sure how to switch profiles in this way. If possible, it would be handy for the arcade stick, if you could also hold START and press R1 or R2 to get "R3" and likewise, L1 or L2 to get "L3".
If anyone could help, I'd be really appreciative. Absolutely love what's possible with the Titan One. Brilliant device.
Barrie
-
SpecialEffect - Sergeant Major of the Army
- Posts: 203
- Joined: Mon Apr 07, 2014 3:26 pm
Re: Accessible Script Requests for Disabled Users
It is always a pleasure help you!!
- Code: Select all
define NORMAL = 0;
define DPAD = 1;
define RIGHTSTICK = 2;
int profile = NORMAL;
main {
if(get_val(XB360_START)) {
if(event_press(XB360_LEFT)) profile = NORMAL;
else if(event_press(XB360_UP)) profile = DPAD;
else if(event_press(XB360_RIGHT)) profile = RIGHTSTICK;
else if(event_press(XB360_DOWN)) {
profile = profile + 1;
if(profile > 2) profile = 0;
}
set_val(TRACE_1, profile);
}
if(profile == NORMAL) {
// Nothing todo
} else if(profile == DPAD) {
if(abs(get_val(XB360_LY)) >= 20 || abs(get_val(XB360_LX)) >= 20) {
if(get_val(XB360_LY) <= -30) set_val(XB360_UP, 100);
else if(get_val(PS3_LY) >= 30) set_val(XB360_DOWN, 100);
if(get_val(XB360_LX) <= -30) set_val(XB360_LEFT, 100);
else if(get_val(PS3_LX) >= 30) set_val(XB360_RIGHT, 100);
}
set_val(XB360_LX, 0);
set_val(XB360_LY, 0);
} else if(profile == RIGHTSTICK) {
swap(XB360_LX, XB360_RX);
swap(XB360_LY, XB360_RY);
}
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Accessible Script Requests for Disabled Users
Huge thanks for getting back so quickly, much appreciated.
I'm finding this testing with Forza 2 Horizon on Xbox One....
1. START needs to be passed through when tapped, but swallowed when held (in anticipation of the joystick or a button being tapped to select a new mode/slot). It would be fantastic to be able to smoothly swap the power of the stick, without the Options menu popping up everytime, which is what currently happens.
2. I couldn't quite get your solution to work, but I can see it's cleverly doing it all within one profile. I'd be looking to sacrifice three slots (1= left-stick, 2=d-pad, 3= right stick) so that you get a nice clear indication that you've changed mode from the LED display on the Titan One.
3. All the modes I assume will need to share the script that changes the mode. An example of script 4 might be a single-stick driving mode:
if(get_val(XB360_LY) < -20 ) set_val(XB360_RT,80);
if(get_val(XB360_LY) > 20 ) set_val(XB360_LT,80);set_val(XB360_LY,0);
4. Ideally the stick that can be changed will be the left-stick, not the d-pad. This would work for a joystick and two big buttons (if using a modern day arcade stick, like the Mayflash Arcade Fightstick F300).... it would work for someone using a chin-switch and a sip-puff and noise switch... etc.
If this is a bit tricky to do, maybe just a way to change slot, using held then released START button (swallowed - with a quick tap to make it work as a normal start button).
Huge thanks again for all your help.
Barrie
I'm finding this testing with Forza 2 Horizon on Xbox One....
1. START needs to be passed through when tapped, but swallowed when held (in anticipation of the joystick or a button being tapped to select a new mode/slot). It would be fantastic to be able to smoothly swap the power of the stick, without the Options menu popping up everytime, which is what currently happens.
2. I couldn't quite get your solution to work, but I can see it's cleverly doing it all within one profile. I'd be looking to sacrifice three slots (1= left-stick, 2=d-pad, 3= right stick) so that you get a nice clear indication that you've changed mode from the LED display on the Titan One.
3. All the modes I assume will need to share the script that changes the mode. An example of script 4 might be a single-stick driving mode:
if(get_val(XB360_LY) < -20 ) set_val(XB360_RT,80);
if(get_val(XB360_LY) > 20 ) set_val(XB360_LT,80);set_val(XB360_LY,0);
4. Ideally the stick that can be changed will be the left-stick, not the d-pad. This would work for a joystick and two big buttons (if using a modern day arcade stick, like the Mayflash Arcade Fightstick F300).... it would work for someone using a chin-switch and a sip-puff and noise switch... etc.
If this is a bit tricky to do, maybe just a way to change slot, using held then released START button (swallowed - with a quick tap to make it work as a normal start button).
Huge thanks again for all your help.
Barrie
-
SpecialEffect - Sergeant Major of the Army
- Posts: 203
- Joined: Mon Apr 07, 2014 3:26 pm
Re: Accessible Script Requests for Disabled Users
Hi Barrie,
I implement your first suggestion, please check the script below.
I am not sure if I fully understood the remaining 3 requests. It seems all three are related to the same thing, have the same script in tree different slots, here the behavior depends of the slot number. It that correct?
I implement your first suggestion, please check the script below.
I am not sure if I fully understood the remaining 3 requests. It seems all three are related to the same thing, have the same script in tree different slots, here the behavior depends of the slot number. It that correct?
- Code: Select all
define NORMAL = 0;
define DPAD = 1;
define RIGHTSTICK = 2;
int profile = NORMAL;
main {
// 1. START needs to be passed through when tapped, but swallowed when held
// (in anticipation of the joystick or a button being tapped to select a new
// mode/slot). It would be fantastic to be able to smoothly swap the power
// of the stick, without the Options menu popping up everytime, which is
// what currently happens.
if(get_val(XB360_START)) {
if(event_press(XB360_LEFT)) profile = NORMAL;
else if(event_press(XB360_UP)) profile = DPAD;
else if(event_press(XB360_RIGHT)) profile = RIGHTSTICK;
else if(event_press(XB360_DOWN)) {
profile = profile + 1;
if(profile > 2) profile = 0;
}
set_val(TRACE_1, profile);
set_val(XB360_START, 0);
} else if(event_release(XB360_START) && get_ptime(XB360_START) < 300) {
combo_run(StartTap);
}
if(profile == NORMAL) {
// Nothing todo
} else if(profile == DPAD) {
if(abs(get_val(XB360_LY)) >= 20 || abs(get_val(XB360_LX)) >= 20) {
if(get_val(XB360_LY) <= -30) set_val(XB360_UP, 100);
else if(get_val(PS3_LY) >= 30) set_val(XB360_DOWN, 100);
if(get_val(XB360_LX) <= -30) set_val(XB360_LEFT, 100);
else if(get_val(PS3_LX) >= 30) set_val(XB360_RIGHT, 100);
}
set_val(XB360_LX, 0);
set_val(XB360_LY, 0);
} else if(profile == RIGHTSTICK) {
swap(XB360_LX, XB360_RX);
swap(XB360_LY, XB360_RY);
}
}
combo StartTap {
set_val(XB360_START, 100);
wait(80);
}
ConsoleTuner Support Team
-
J2Kbr - 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 82 guests