Wiimote-BF4-PS3

This script allows the use of the Wii Remote with Nunchuck to play Battlefield 4 on the PS3. This configuration allows operation of all vehicles. Aircraft takes some getting used to as banking a pitching up down is controlled by panning and tilting the wiimote. BF3 used a different controller scheme that I did not write for. To select the Dualshock's left hand up-down-left-right buttons simply hold down the left arm on the wiimote's d-pad and tap the nunchuck's joy stick up-down-left-right.
Version1.0
AuthorWiimote Fuzzy
Publish DateFri, 4 Jul 2014 - 16:15
Last UpdateFri, 4 Jul 2014 - 16:15
Downloads89
RATE


0

0

Code: Select all
// Wiimote/Nunchuck for Battlefield 4 on PS3.
// adapted by Wiimote Fuzzy from Wiimot3's
// wiimote_for_all_call_of_duty__and_all_plateform.gpc
// and  Call of Duty PS3 ( By Wiimote & J2Kbr)
//----------------------------------------
unmap ALL_REMAPS;
remap WII_TWO   ->  PS3_START;      //start button, menu
remap WII_B     ->  PS3_R1;         //Fire, all modes.
remap WII_C     ->  PS3_CIRCLE;     //Crouch
remap WII_A     ->  PS3_L1;         //Aim/zoom/optics
remap WII_Z     ->  PS3_L3;         //sprint
remap WII_IRX   ->  PS3_RX;         //Look, Heli&jet roll
remap WII_IRY   ->  PS3_RY;         //Look, Heli&jet pitch
remap WII_HOME  ->  PS3_PS;         //PS button
remap WII_NX    ->  PS3_LX;         //move, heli&jet yaw
remap WII_NY    ->  PS3_LY;         //move, throttle
remap WII_MINUS ->  PS3_R2;         //spot
remap WII_PLUS  ->  PS3_L2;         //'nade
remap WII_RIGHT ->  PS3_TRIANGLE;   //swap primary and secondary weapon
remap WII_ONE   ->  PS3_SELECT;     //select button
remap WII_UP    ->  PS3_CROSS;      //Jump, Cross button
remap WII_DOWN  ->  PS3_SQUARE;     //reload weapon
remap WII_LEFT  ->  WII_LEFT;       //use as modifier key
//phantom buttons choosen by macro or shaking nunchuck
remap WII_RT    ->  PS3_UP;         //Hold down Left D-pad and tap Nunchuck stick up
remap WII_ZR    ->  PS3_DOWN;       //Hold down Left D-pad and tap Nunchuck stick down
remap WII_X     ->  PS3_LEFT;       //Hold down Left D-pad and tap Nunchuck stick left
remap WII_Y     ->  PS3_RIGHT;      //Hold down Left D-pad and tap Nunchuck stick right
remap WII_RX    ->  PS3_R3;         //Jerk Nunchuck down to melee, or in vehicles/aircraft switches camera view.
unmap PS3_ACCX;
unmap PS3_ACCY;
unmap PS3_ACCZ;
 
main {
        //  PS3 RXY = Wiimote IRXY by Wiimot3 (adjusted mid point & removed stickize)
        //  Just a little slow with PS3 set to 20 sensitivity, will try higher.
            set_val(WII_IRX, inv(get_val(WII_IRX)));
            sensitivity(WII_IRX , 50, 100);
            sensitivity(WII_IRY , 50, 100);
            deadzone(WII_IRX, WII_IRY, DZ_CIRCLE, 30);
 
 
        //  PS3 LXY = Nunchuck NXY by Wiimot3
            sensitivity(WII_NX , NOT_USE, 150);
            sensitivity(WII_NY , NOT_USE, 150);
            deadzone(WII_NX, WII_NY, DZ_CIRCLE,5);   
 
 
        //Macro by Wiimote Fuzzy. Hold Wii-Left and slect with Nunchuck stick up-down-left-right.
            if(get_val(WII_LEFT) && get_val(WII_NY) > 90) set_val(WII_ZR, 100);
            if(get_val(WII_LEFT) && get_val(WII_NY) < -90) set_val(WII_RT, 100);
            if(get_val(WII_LEFT) && get_val(WII_NX) > 90) set_val(WII_Y, 100);
            if(get_val(WII_LEFT) && get_val(WII_NX) < -90) set_val(WII_X, 100);
 
        //Snap nunchuck up or down to Melee, or in vehicle/aircraft swaps camera view -
            if(get_val(WII_ACCNZ) > 15) set_val(WII_RX, 100);
 
}