Accessible Script Requests for Disabled Users

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

Re: Accessible Script Requests for Disabled Users

Postby J2Kbr » Mon Jun 15, 2015 9:24 pm

you are welcome. needing anything else please let us know. :)
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: Accessible Script Requests for Disabled Users

Postby UK_Wildcats » Mon Jun 15, 2015 10:16 pm

J2Kbr wrote:you are welcome. needing anything else please let us know. :)


+1
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Accessible Script Requests for Disabled Users

Postby cdanv » Thu Sep 03, 2015 4:40 pm

I was seeking help to set "lock button" (function similar to the existing grip button on Windows), which many people (with motor disabilities or physical) use to better accessibility. It's something I need for this reason.

Elvish helped me with the following script that worked perfectly:

**********************************************************************************
Code: Select all
int Sighting = FALSE;

main
{
    if(event_press(PS3_L2)){
        Sighting = !Sighting;
    }
    if(Sighting){
        set_val(PS3_L2, 100);
    }

}


**********************************************************************************
Perfecthuntr helped me with Visual Scripting:


My thanks go to Elvish, Perfecthuntr and J2Kbr for the help and attention always.
Attachments
accessibility.png
accessibility.png (63.37 KiB) Viewed 3938 times
User avatar
cdanv
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Thu Aug 20, 2015 5:05 am

Re: Accessible Script Requests for Disabled Users

Postby UK_Wildcats » Thu Sep 03, 2015 5:25 pm

Awesome. We have a great forum with lots of members who are willing to help. If you need anything else, let us know.
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Accessible Script Requests for Disabled Users

Postby cdanv » Fri Sep 04, 2015 4:26 am

I studied the script in Visual Scripting Perfecthuntr set up at me, locking function, and found that to include more than one button with this function, simply change the number of TRACE and the different button. As you can see in the picture, it was possible to set L2 and L1 to lock function. I hope this is helpful to others, as it has been for me.
Attachments
accessibility2.png
accessibility2.png (71.49 KiB) Viewed 3931 times
User avatar
cdanv
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Thu Aug 20, 2015 5:05 am

Re: Accessible Script Requests for Disabled Users

Postby UK_Wildcats » Fri Sep 04, 2015 5:05 pm

Very nice
User avatar
UK_Wildcats
Brigadier General
Brigadier General
 
Posts: 2243
Joined: Thu Jan 08, 2015 6:53 pm

Re: Accessible Script Requests for Disabled Users

Postby perfecthuntr » Mon Sep 07, 2015 5:18 pm

cdanv wrote:I studied the script in Visual Scripting Perfecthuntr set up at me, locking function, and found that to include more than one button with this function, simply change the number of TRACE and the different button. As you can see in the picture, it was possible to set L2 and L1 to lock function. I hope this is helpful to others, as it has been for me.

Yea, I forgot to mention that, but you can certainly use the lock function on many of the buttons. There should be enough TRACE values that you can use to increase how many buttons have that function. Glad that I could help!!
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Re: Accessible Script Requests for Disabled Users

Postby cdanv » Wed Jan 20, 2016 5:37 pm

Hello everyone.
Schedules that you passed me has helped me a lot ... it has been very good ...
In some games it has been necessary to enable and disable functions depending on the stage, I wonder how to program for it to be turned on and off any function during the game, without having to I disable Titan One.
For example ... I wanted to activate a function holding SELECT for 5 seconds and disable the same function doing the same process (holding 5 seconds) or turn off and on by pressing the button 5 times X.
Something like:
Enable or disable following function holding SELECT for 5 seconds:

Code: Select all
main {
    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);
    }

Activate or deactivate the following function by pressing X 5 times:

main {
    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);
    }
}


Thank you in advance your attention.
User avatar
cdanv
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Thu Aug 20, 2015 5:05 am

Re: Accessible Script Requests for Disabled Users

Postby AKHUGHES90 » Wed Jan 20, 2016 6:00 pm

cdanv wrote:Hello everyone.
Schedules that you passed me has helped me a lot ... it has been very good ...
In some games it has been necessary to enable and disable functions depending on the stage, I wonder how to program for it to be turned on and off any function during the game, without having to I disable Titan One.
For example ... I wanted to activate a function holding SELECT for 5 seconds and disable the same function doing the same process (holding 5 seconds) or turn off and on by pressing the button 5 times X.
Something like:
Enable or disable following function holding SELECT for 5 seconds:

Code: Select all
main {
    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);
    }

Activate or deactivate the following function by pressing X 5 times:

main {
    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);
    }
}


Thank you in advance your attention.



You would just need to use a toggle with your code like follows,

Code: Select all


define STARTCOMBOBUTTON = XB1_RT;
int modtoggle=TRUE;


main {
    if(get_val(XB1_VIEW) && get_ptime(XB1_VIEW) > 500) {
        modtoggle=!modtoggle;
    }
    if(get_val(STARTCOMBOBUTTON) && !modtoggle) {
        combo_run(YOURCOMBO);
    }
}

combo YOURCOMBO {
}
Image
"We always start with completing the difficult. It just takes us a little longer to do the impossible."
Console Tuner Support Team®
User avatar
AKHUGHES90
Major
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

Postby cdanv » Wed Jan 20, 2016 7:46 pm

Hi, AKHUGHES90.
Thanks a lot for the help. I'm trying to do as you instructed, but do not know anything about programming. I am struggling to resolve an error that is appearing. The error message is as follows:

Code: Select all
  ------ GPC: Build started ------
   > 4: New* :
    > ERROR line 0: syntax error near unexpected token ''.
   Build failed with 1 errors ...

Other errors, I managed to solve (apparently), but this I do not know what it is. May have other errors, then, I'll leave all the command here as well, if you can, it will be easy to identify the error or errors.
Thank you again.

/* *
*  To learn more access GPC Language Reference on Help menu.
* *********************************************************** */


define STARTCOMBOBUTTON = PS3_L1;
int modtoggle=TRUE;

main {
    if(get_val(PS3_L1) && get_ptime(PS3_L1) > 500) {
        modtoggle=!modtoggle;
    }
    if(get_val(STARTCOMBOBUTTON) && !modtoggle) {
        combo_run(YOURCOMBO);
    }
}

combo YOURCOMBO {

    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);
    }
User avatar
cdanv
Master Sergeant
Master Sergeant
 
Posts: 29
Joined: Thu Aug 20, 2015 5:05 am

PreviousNext

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 77 guests