360 shake like ps3 and ps4

Titan One general support. Questions, firmware update, feature request.

360 shake like ps3 and ps4

Postby cmoneytheman92 » Wed Feb 10, 2016 12:22 am

so people u know how the ps4 and ps3 controller u shake it for certain games I wanna do that with a button press with the 360 controller how do I do it I asked before but couldnt get a answer so maybe somebody can help me
User avatar
cmoneytheman92
First Sergeant
First Sergeant
 
Posts: 43
Joined: Sat Feb 06, 2016 3:31 pm

Re: 360 shake like ps3 and ps4

Postby J2Kbr » Wed Feb 10, 2016 10:15 am

oh... now I got it ... you want use the motion sensor of a PS3Ps4 controller to drive the analog stick of a Xbox 360 ... okay, this is how you can do that:

Code: Select all
main {
    // ACC AIM ASSIST
    set_val(XB360_RX, inv(get_val(PS4_ACCX)));
    set_val(XB360_RY, inv(get_val(PS4_ACCY)));
    sensitivity(XB360_RX, NOT_USE, 140 * 3);
    sensitivity(XB360_RY, NOT_USE, 150 * 3);
    deadzone(XB360_RX, XB360_RY, DZ_CIRCLE, 28);
}
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: 360 shake like ps3 and ps4

Postby cmoneytheman92 » Wed Feb 10, 2016 11:35 pm

it don't work just the right analog won't work
User avatar
cmoneytheman92
First Sergeant
First Sergeant
 
Posts: 43
Joined: Sat Feb 06, 2016 3:31 pm

Re: 360 shake like ps3 and ps4

Postby J2Kbr » Mon Feb 15, 2016 10:12 am

because the script is overwriting the right analog stick with the motion sensor ... maybe you want use this feature only when pressing the aim button:
Code: Select all
define SENSITIVITY = 3;

int accaim_reset, accaim_x, accaim_y;

main {
    // ACC AIM ASSIST
    if(get_val(PS4_L2)) {
        if(event_press(PS4_L2)) accaim_reset = TRUE;
        if(abs(get_val(PS4_RX)) > 20 || abs(get_val(PS4_RY)) > 20) {
            accaim_reset = TRUE;
        } else {
            if(accaim_reset) {
                accaim_reset = FALSE;
                accaim_x = get_val(PS4_ACCX);
                accaim_y = get_val(PS4_ACCY);
            }
            set_val(PS4_RX, inv((get_val(PS4_ACCX) - accaim_x)));
            set_val(PS4_RY, inv((get_val(PS4_ACCY) - accaim_y)));
            sensitivity(PS4_RX, NOT_USE, 140 * SENSITIVITY);
            sensitivity(PS4_RY, NOT_USE, 150 * SENSITIVITY);
            deadzone(PS4_RX, PS4_RY, DZ_CIRCLE, 28);
        }
    }
}
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm


Return to Titan One Device

Who is online

Users browsing this forum: Lost Gypsy and 72 guests