SOLVED: Mapping the wiimote C button to PS3 to square

Wiimote tutorials, configurations and GPC scripts (FPS like in Nintendo Wii/WiiU).

Moderator: OFC-Giorgio

SOLVED: Mapping the wiimote C button to PS3 to square

Postby ashep49017 » Wed Oct 15, 2014 8:11 am

I'm attempting to remap the wiimote C button to the PS3 SQUARE for dual purpose (use/sprint). This is how I currently use this button on the WII U/wiimote. I currently have the PS3 Square(use/reload) mapped to the wiimote twist counter-clockwise motion. I mostly play COD/BO/Ghost.


Any suggestions on a GPC script?

thanks ahead of time

Shep
User avatar
ashep49017
Sergeant First Class
Sergeant First Class
 
Posts: 24
Joined: Wed Oct 15, 2014 7:54 am

Re: mapping the wiimote C button to PS3 to square= use/sprin

Postby OFC-Giorgio » Wed Oct 15, 2014 10:24 am

Here's a cod script I use:

Code: Select all

/*
   Changelog

   20140917-1
             • Removed crouch/prone macro (standard wii C button works fine).
              • Use different sensitivity for ADS (aiming down the sights) and non ADS (hip fire)
                via ADS_SENSITIVITY and NON_ADS_SENSITIVITY parameters
              • Led 3 indicates ADS.
              • Led 4 indicates wiimote is out of reach of sensorbar and
                IRX & IRY are set to 0 to prevent spinning around.
              • RUMBLE_ENABLED parameter to enable/disable vibrating
              • Documented all wii keys (including non nunchuk) and keys for dummy mappings

   Script to mimic the "bravo" settings wiimote+nunchuck of the wii(u)
   cod games (ghosts, blackops 2, modern warfare 3, black ops, modern warfare reflex and world at war).

   From the wiiu manual:
   • Z Button – ADS
   • C Button – Crouch/Prone
   • Control Stick – Move
   • Up on the +Control Pad – Jump
   • Right on the +Control Pad – Switch Weapon
   • Left on the +Control Pad – Inventory
   • Down on the +Control Pad – Melee Attack
   • A Button – Use/Sprint/Lock Camera
   • - Button – Throw Tacticals
   • + Button – Throw Lethals
   • 1 Button – Objectives/Menu
   • 2 Button – Scoreboard
   • B Button (underneath controller) – Fire Weapon
   • Shake Nunchuk – Reload

   Hold Wii-Left and select with Nunchuck stick up, down, left or right (for next-killstreak, previous-killstreak,
   use killstreak, switch to rifle grenadelauncher attachment respectively).

   Bravo settings:
   • shake nunchuk / reload is disabled,
   • - is used for reload and
   • + is still used to throw lethals but + while twisting the wiimote is used for throwing tacticals
*/


define ADS_SENSITIVITY     = 45; // a lower value than the standard 50 value means more sensitive
define NON_ADS_SENSITIVITY = 50; // a lower value than the standard 50 value means more sensitive

//define RUMBLE_ENABLED = TRUE; // vibratiing enabled
define RUMBLE_ENABLED = FALSE; // vibrating disabled

unmap ALL_REMAPS;
   
remap  WII_MINUS    -> PS3_SQUARE;   // Bravo settings: reload
remap  WII_HOME     -> PS3_PS;       // home menu
remap  WII_PLUS     -> PS3_R2;       // lethal grenade
remap  WII_ONE      -> PS3_START;    // menu/map
remap  WII_TWO      -> PS3_SELECT;   // score
remap  WII_A        -> PS3_L3;       // "use" action difference:
                                     // in wii: A:use/sprint   -:reload
                                     // in ps3: square=use/reload and L3=sprint
                                     // for now: assign the wii A button to sprinting
                                     //          and use the wii minus (reload) button also
                                     //          to use/take dropped care packages
remap  WII_B        -> PS3_R1;       // fire
remap  WII_UP       -> PS3_CROSS;    // jump/mantle
remap  WII_DOWN     -> PS3_R3;       // melee
remap  WII_RIGHT    -> PS3_TRIANGLE; // switch weapon
remap  WII_C        -> PS3_CIRCLE;   // crouch/prone
remap  WII_Z        -> PS3_L1;       // zoom/aiming down the sights (ADS)
remap  WII_NX       -> PS3_LX;       // move
remap  WII_NY       -> PS3_LY;       // move
remap  WII_IRX      -> PS3_RX;       // look
remap  WII_IRY      -> PS3_RY;       // look

unmap PS3_ACCX;
unmap PS3_ACCY;
unmap PS3_ACCZ;

// wiimote+nunchuk only buttons:
// WII_ONE/WII_TWO/WII_ACCX/WII_ACCY/WII_ACCZ/WII_ACCNX/WII_ACCNY/WII_ACCNZ/WII_IRX/WII_IRY

// Common identical (classic) controller (pro) and wiimote+nunchuk buttons:
// WII_HOME/WII_MINUS/WII_PLUS/WII_UP/WII_DOWN/WII_LEFT/WII_RIGHT/WII_A/WII_B

// Overlapping (classic) controller (pro) with wiimote+nunchuk:
// (classic) controller (pro) button WII_LT = nunchuk WII_C
// (classic) controller (pro) button WII_ZL = nunchuk WII_Z
// (classic) controller (pro) button WII_LX = nunchuk WII_NX
// (classic) controller (pro) button WII_LY = nunchuk WII_NY

// (classic) controller (pro) buttons that are not used in wiimote+nunchuk mode:
// WII_RT
// WII_ZR
// WII_RX
// WII_RY
// WII_X
// WII_Y
// used to bind them to PS3 button and force the wii buttons to trigger the PS3 button
// by the setval commands in the script (see (1) & (2)):

// (1)
//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
//phantom buttons choosen by macro or shaking nunchuck
remap WII_X  -> PS3_LEFT// left
remap WII_RX -> PS3_RIGHT; // right
remap WII_Y  -> PS3_UP;    // up
remap WII_RY -> PS3_DOWN// down
//Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.

// (2)
// dummy mapping for lethal grenades
remap  WII_RT -> PS3_L2;       

init
{
  if(!RUMBLE_ENABLED)
  {
    block_rumble();
  }
}

main
{
   // PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)
   set_val(WII_IRX, inv(get_val(WII_IRX)));
   // PS3 RXY = Wiimote IRXY by Wiimot3 (Wiimote Fuzzy: adjusted mid point & removed stickize)

   // use different sensitivity for ADS (aiming down the sights) and non ADS
   if (get_val(WII_Z))
   {
     set_led(LED_3, 1);
     sensitivity(WII_IRX , ADS_SENSITIVITY, 100);
     sensitivity(WII_IRY , ADS_SENSITIVITY, 100);
   }
   else
   {
     set_led(LED_3, 0);
     sensitivity(WII_IRX , NON_ADS_SENSITIVITY, 100);
     sensitivity(WII_IRY , NON_ADS_SENSITIVITY, 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);
   // PS3 LXY = Nunchuck NXY by Wiimot3

   //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.
   if(get_val(WII_LEFT) && get_val(WII_NX) < -90) set_val(WII_X100);  // left
   if(get_val(WII_LEFT) && get_val(WII_NX) >  90) set_val(WII_RX, 100);  // right
   if(get_val(WII_LEFT) && get_val(WII_NY) < -90) set_val(WII_Y100);  // up
   if(get_val(WII_LEFT) && get_val(WII_NY) >  90) set_val(WII_RY, 100);  // down
   //Macro by Wiimote Fuzzy. Hold Wii-Left and select with Nunchuck stick up, down, left or right.


   // Bravo settings  + while twisting the wiimote is used for throwing tacticals
   if(get_val(WII_PLUS) && get_val(WII_ACCX) > 20)
   {
     set_val(WII_PLUS, 0); // stop/prevent throwing tacticals
     //set_val(PS3_L2, 100); // throw lethal
     set_val(WII_RT, 100); // throw lethal
   }

if(wiir_offscreen())
{
   set_val(WII_IRX, 0); // prevent camera from spinning
   set_val(WII_IRY, 0); // prevent camera from spinning
   set_led(LED_4, 1);
}
else
{
    set_led(LED_4, 0);
}

} // end of main() function 
User avatar
OFC-Giorgio
Lieutenant
Lieutenant
 
Posts: 344
Joined: Mon Sep 15, 2014 4:26 pm


Return to Wiimote, Nunchuk and Sensorbar

Who is online

Users browsing this forum: No registered users and 46 guests