SOLVED: mapping the wiimote to the PS4 Share button

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

Moderator: OFC-Giorgio

SOLVED: mapping the wiimote to the PS4 Share button

Postby ashep49017 » Mon May 25, 2015 4:32 am

I have ran out of buttons. OFC-G or anyone know how to mimic the PS4 SHARE button on WII-mote without interfering with other controls. Is there a way to hold WII left down and push A together for share? The best I could do was map the left button directly to the PS4 Share but everytime I called in a scorestreak on COD the controller thought I was using the share button.

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

Re: mapping the wiimote to the PS4 Share button

Postby perfecthuntr » Mon May 25, 2015 7:42 am

Well, based on your question about activating the share button with your button combination, I can make a quick script that should do that for you. I'm not really sure if it will work or not, but you can try it out. Here it goes:

Code: Select all
main {
    if (get_val(WII_LEFT) && event_press(WII_A)) {
        combo_run(SHARE);
    }
}

combo SHARE {
    set_val(PS4_SHARE, 100);
    wait(100);
    wait(100);
}

Just hold down left and then push A to mimic the SHARE button.
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Re: mapping the wiimote to the PS4 Share button

Postby ashep49017 » Tue May 26, 2015 7:13 am

Perfecthuntr,

I tried it and couldnt get it too work. I might have something interfering with the command. I attached my script. Its very much a bastardized version from many people and then some tweaks myself. Hopefully I have given proper credit to all in the script. If you can tell me whats wrong I would greatly appreciate it.



let me know what you think.


Code: Select all
//EDITED BY SHEP
   //MACRO BY FRASIE WITH EDITS
    /*
       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 CUSTOM 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).

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


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

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

    define MOVE_LEFT_RIGHT_3STATES         = TRUE;   // stick is only left/neutral/right (horizontal)
    //define MOVE_LEFT_RIGHT_3STATES       = FALSE;  // stick is -100% - 100% (horizontal)
    define MOVE_FORWARD_BACKWARD_3STATES   = TRUE;   // stick is only up/neutral/down (vertical)
    //define MOVE_FORWARD_BACKWARD_3STATES = FALSE;  // stick is -100% - 100% (vertical)

    unmap ALL_REMAPS;
       
    remap  WII_HOME     -> PS4_PS;       // home menu
    remap  WII_MINUS    -> PS4_R2;        // LETHAL
    remap  WII_PLUS     -> PS4_L2;      // NON-lethal grenade
    remap  WII_ONE      -> PS4_CROSS;    // jump/mantle
    remap  WII_TWO      -> PS4_CIRCLE;   // crouch/prone
    remap  WII_A        -> PS4_SQUARE;   // "use/RELOAD" action difference:
                                        // in wii: A:use/sprint   -:reload
                                         // in ps3: square=use/reload and L3=sprint
                                         // for now: assign the wii A button to USE/RELOAD
    remap  WII_B        -> PS4_R1;       // fire
    remap  WII_UP       -> PS3_START;    // menu/map
    remap  WII_DOWN     -> PS4_R3;       // melee
    remap  WII_RIGHT    -> PS4_TRIANGLE; // switch weapon
    remap  WII_C        -> PS4_L3;       // SPRINT
    remap  WII_Z        -> PS4_L1;       // zoom/aiming down the sights (ADS)
    remap  WII_NX       -> PS4_LX;       // move
    remap  WII_NY       -> PS4_LY;       // move
    remap  WII_IRX      -> PS4_RX;       // look
    remap  WII_IRY      -> PS4_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

   
    //MACRO BY FRASIE WITH EDITS
    // (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; 
     
    //MACRO BY FRASIE
    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.


// make nunchuck stick 3 states only (per direction):
   // - stick is only left/neutral/right (horizontal)
   if (MOVE_LEFT_RIGHT_3STATES)
   {
     if (get_val(WII_NX) < -20)     
     {   
        set_val(PS3_LX, -100); // left
     }
     else
     if (get_val(WII_NX) > 20)     
     {   
        set_val(PS3_LX, 100); // right
     }
     else
     {
        set_val(PS3_LX, 0);  // neutral
     }
   }

   // - stick is only up/neutral/down (vertical)
   if (MOVE_FORWARD_BACKWARD_3STATES)
   {
     if (get_val(WII_NY) < -20)     
     {   
        set_val(PS3_LY, -100); // up
     }
     else
     if (get_val(WII_NY) > 20)
     {   
        set_val(PS3_LY, 100); // down
     }
     else
     {
        set_val(PS3_LY, 0);   // neutral
     }
   }

    //Snap nunchuck up or down to Melee, or in vehicle/aircraft swaps camera view -
            if(get_val(WII_ACCZ) > 20) set_val(WII_DOWN, 100);
            if(get_val(WII_ACCNX) > 30) set_val(WII_A, 100);

        // Edited MACRO from OFC Giorgia
       // CUSTOM: B BUTTON + while twisting the wiimote is used for throwing LETHAL
       if(get_val(WII_B) && get_val(WII_ACCX) > 25)
       {
         set_val(WII_PLUS, 0); // stop/prevent throwing tacticals
         set_val(WII_B, 0); // not shoot
         set_val(WII_A, 0); //not use/reload
         set_val(WII_MINUS, 100); // throw lethal
       }
    //mapping wii_left and wii_A to the PS4 share button from perfecthuntr
    if (get_val(WII_LEFT) && event_press(WII_A)) {
        combo_run(SHARE);
    }
}

combo SHARE {
    set_val(PS4_SHARE, 100);
    wait(100);
    wait(100);
   
   
   // 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

        //EDITED MACRO FROM FRASIE
User avatar
ashep49017
Sergeant First Class
Sergeant First Class
 
Posts: 24
Joined: Wed Oct 15, 2014 7:54 am

Re: mapping the wiimote to the PS4 Share button

Postby perfecthuntr » Tue May 26, 2015 7:23 am

I'm thinking that maybe it's not working the way you were intending. Try out this instead:

Code: Select all
main {
    if (get_val(WII_LEFT) && get_val(WII_A)) {
        set_val(PS4_SHARE, 100);
    }
}


This will make it so that the two buttons will push the SHARE button. Before, it would have just tapped the SHARE button. This will allow you to hold down the SHARE button.
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Re: mapping the wiimote to the PS4 Share button

Postby ashep49017 » Thu May 28, 2015 6:35 am

So when I push both WII_left and A it activate my PS4_R2. Im not sure why. I dont see that in my script.
User avatar
ashep49017
Sergeant First Class
Sergeant First Class
 
Posts: 24
Joined: Wed Oct 15, 2014 7:54 am

Re: mapping the wiimote to the PS4 Share button

Postby perfecthuntr » Fri May 29, 2015 11:56 pm

This is probably caused by the remappings you have in your script. Can you make a new file that is ONLY the code that I have in my post above? See if that works. If so, we can look at your script. If not, then we need to figure out why.
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Re: mapping the wiimote to the PS4 Share button

Postby ashep49017 » Sat May 30, 2015 1:57 am

The script by itself works. when I place it into my script above it doesn't
User avatar
ashep49017
Sergeant First Class
Sergeant First Class
 
Posts: 24
Joined: Wed Oct 15, 2014 7:54 am

Re: mapping the wiimote to the PS4 Share button

Postby perfecthuntr » Sat May 30, 2015 2:16 am

Ok. It's because of the remapping on WII_A. This should work for you now.

Code: Select all
//EDITED BY SHEP
   //MACRO BY FRASIE WITH EDITS
    /*
       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 CUSTOM 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).

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


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

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

    define MOVE_LEFT_RIGHT_3STATES         = TRUE;   // stick is only left/neutral/right (horizontal)
    //define MOVE_LEFT_RIGHT_3STATES       = FALSE;  // stick is -100% - 100% (horizontal)
    define MOVE_FORWARD_BACKWARD_3STATES   = TRUE;   // stick is only up/neutral/down (vertical)
    //define MOVE_FORWARD_BACKWARD_3STATES = FALSE;  // stick is -100% - 100% (vertical)

    unmap ALL_REMAPS;
       
    remap  WII_HOME     -> PS4_PS;       // home menu
    remap  WII_MINUS    -> PS4_R2;        // LETHAL
    remap  WII_PLUS     -> PS4_L2;      // NON-lethal grenade
    remap  WII_ONE      -> PS4_CROSS;    // jump/mantle
    remap  WII_TWO      -> PS4_CIRCLE;   // crouch/prone
    remap  WII_A        -> PS4_SQUARE;   // "use/RELOAD" action difference:
                                        // in wii: A:use/sprint   -:reload
                                         // in ps3: square=use/reload and L3=sprint
                                         // for now: assign the wii A button to USE/RELOAD
    remap  WII_B        -> PS4_R1;       // fire
    remap  WII_UP       -> PS3_START;    // menu/map
    remap  WII_DOWN     -> PS4_R3;       // melee
    remap  WII_RIGHT    -> PS4_TRIANGLE; // switch weapon
    remap  WII_C        -> PS4_L3;       // SPRINT
    remap  WII_Z        -> PS4_L1;       // zoom/aiming down the sights (ADS)
    remap  WII_NX       -> PS4_LX;       // move
    remap  WII_NY       -> PS4_LY;       // move
    remap  WII_IRX      -> PS4_RX;       // look
    remap  WII_IRY      -> PS4_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

   
    //MACRO BY FRASIE WITH EDITS
    // (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;
     
    //MACRO BY FRASIE
    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.


// make nunchuck stick 3 states only (per direction):
   // - stick is only left/neutral/right (horizontal)
   if (MOVE_LEFT_RIGHT_3STATES)
   {
     if (get_val(WII_NX) < -20)     
     {   
        set_val(PS3_LX, -100); // left
     }
     else
     if (get_val(WII_NX) > 20)     
     {   
        set_val(PS3_LX, 100); // right
     }
     else
     {
        set_val(PS3_LX, 0);  // neutral
     }
   }

   // - stick is only up/neutral/down (vertical)
   if (MOVE_FORWARD_BACKWARD_3STATES)
   {
     if (get_val(WII_NY) < -20)     
     {   
        set_val(PS3_LY, -100); // up
     }
     else
     if (get_val(WII_NY) > 20)
     {   
        set_val(PS3_LY, 100); // down
     }
     else
     {
        set_val(PS3_LY, 0);   // neutral
     }
   }

    //Snap nunchuck up or down to Melee, or in vehicle/aircraft swaps camera view -
            if(get_val(WII_ACCZ) > 20) set_val(WII_DOWN, 100);
            if(get_val(WII_ACCNX) > 30) set_val(WII_A, 100);

        // Edited MACRO from OFC Giorgia
       // CUSTOM: B BUTTON + while twisting the wiimote is used for throwing LETHAL
       if(get_val(WII_B) && get_val(WII_ACCX) > 25)
       {
         set_val(WII_PLUS, 0); // stop/prevent throwing tacticals
         set_val(WII_B, 0); // not shoot
         set_val(WII_A, 0); //not use/reload
         set_val(WII_MINUS, 100); // throw lethal
       }
    //mapping wii_left and wii_A to the PS4 share button from perfecthuntr
    if (get_val(WII_LEFT) && get_val(PS4_SQUARE)) {
        set_val(PS4_SHARE, 100);
    }
    else {
        set_val(PS4_SHARE, 0);
    }
}

        //EDITED MACRO FROM FRASIE
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Re: mapping the wiimote to the PS4 Share button

Postby ashep49017 » Sat May 30, 2015 8:27 am

NO luck. still same result. I took the entire script above and built and run. It still doesnt make the share button work. Im puzzled now. something is interfering with the script. this is why i hated C programming and pascal years ago. I never could solve these type problems. lol
User avatar
ashep49017
Sergeant First Class
Sergeant First Class
 
Posts: 24
Joined: Wed Oct 15, 2014 7:54 am

Re: mapping the wiimote to the PS4 Share button

Postby perfecthuntr » Sat May 30, 2015 3:32 pm

Nothing is interfering with the script, there is just some sort of logic error in it. You said you had it working at one point with a simpler remapping? What did that portion of the script look like? By the way, I'm going to clean that code up for you later when I get a chance. The spacing is all over the place and there could be some syntax goofs with the new lines between the if and else areas and their respective brackets.
ConsoleTuner Support Team
User avatar
perfecthuntr
Major
Major
 
Posts: 897
Joined: Wed Jan 14, 2015 8:35 am
Location: Tennessee

Next

Return to Wiimote, Nunchuk and Sensorbar

Who is online

Users browsing this forum: No registered users and 49 guests