Can't have two buttons mapped to same function?

Gtuner Plugins support. MaxAim, MaxRemapper, Combo Magick, Game Rec.

Can't have two buttons mapped to same function?

Postby NonDuality » Thu Aug 28, 2014 10:47 pm

I'm trying to use a 360 controller on my PS3 but ran into a problem with the remapper plugin. I'd like to have both RB and the X button mapped to the RB function but when I do that and test it in game only the RB works while the X button does absolutely nothing at all. Is this a bug or is it not possible to have two buttons mapped to the same function?
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Re: Can't have two buttons mapped to same function?

Postby J2Kbr » Thu Aug 28, 2014 10:53 pm

you need a script for that:

Code: Select all
main {
    if(get_val(XB1_X)) {

        // If X is pressed, then copy its value to RB
        set_val(XB1_RB, get_val(XB1_X));

        // Comment/delete next line is the X button should also be functional.
        set_val(XB1_X, 0);

    }
}
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: Can't have two buttons mapped to same function?

Postby NonDuality » Thu Aug 28, 2014 11:17 pm

Ah ok thanks but shouldn't I use "XB360_RB" and "XB360_X" instead of "XB1_RB" and "XB1_X" since I'm using a 360 controller?

Do I use that script by itself or should I add it to the one I already created with MaxRemapper?

EDIT: Got it working, thanks again!
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Re: Can't have two buttons mapped to same function?

Postby J2Kbr » Fri Aug 29, 2014 9:33 am

Cool you got it to work. :joia:
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: Can't have two buttons mapped to same function?

Postby NonDuality » Fri Aug 29, 2014 9:16 pm

Darn actually it isn't working 100% yet. Its still registering the X button function when I press either button. How exactly do I unmap that so only the RB is registered? Your script says to delete the "set_val(XB360_X, 0);" line to keep the X button functional but leaving it there or deleting it doesn't seem to make a difference.

EDIT: Ok I got the X button unmapped with the "unmap XB360_X;" command but I was thinking I'd like to assign the back/select button to the X button function while keeping it disabled for both the RB and X button. Any suggestions on how to do that?
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Re: Can't have two buttons mapped to same function?

Postby J2Kbr » Fri Aug 29, 2014 11:19 pm

NonDuality wrote:EDIT: Ok I got the X button unmapped with the "unmap XB360_X;" command but I was thinking I'd like to assign the back/select button to the X button function while keeping it disabled for both the RB and X button. Any suggestions on how to do that?

Okay. My suggestion is try no use the remap and unmap commands. They are super fast, but not much intuitive. At the VM core this commands change memory pointers.
This script achieve what you want:
Code: Select all

main {
    // Setting the value to 0 has a similar effect as "unmap"
    set_val(XB360_X, 0);

    // Assign Back to X
    set_val(XB360_X, get_val(XB360_BACK));

    // "unmap" Back
    set_val(XB360_BACK, 0);
}
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: Can't have two buttons mapped to same function?

Postby NonDuality » Sat Aug 30, 2014 5:56 am

Hmm can't get that to work. Doesn't seem to unmap the X function and back isn't working either. Heres my full script if it helps:

Code: Select all
//
// 8/29/2014 5:52:31 PM
// Script generated by MaxRemapper Plugin
//----------------------------------------
remap XB360_X -> PS3_SELECT;
remap XB360_RB -> PS3_SQUARE;
unmap PS3_ACCX;
unmap PS3_ACCY;
unmap PS3_ACCZ;
unmap 27;

main {
    if(get_val(XB360_X)) {

        // If X is pressed, then copy its value to RB
        set_val(XB360_RB, get_val(XB360_X));

        // Comment/delete next line is the X button should also be functional.
        set_val(XB360_X, 0);

    // Setting the value to 0 has a similar effect as "unmap"
    set_val(XB360_X, 0);

    // Assign Back to X
    set_val(XB360_X, get_val(XB360_BACK));

    // "unmap" Back
    set_val(XB360_BACK, 0);

    }
}
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Re: Can't have two buttons mapped to same function?

Postby J2Kbr » Sat Aug 30, 2014 11:24 am

The problem was you still have the remap/unmap commands on script. I removed it and rearranged the script.
I tested, and it is working. X activates RB and BACK activates X.
Code: Select all

main {
    if(get_val(XB360_X)) {
        // If X is pressed, then copy its value to RB
        set_val(XB360_RB, get_val(XB360_X));
        // Setting the value to 0 has a similar effect as "unmap"
        set_val(XB360_X, 0);
    }
    // Assign Back to X
    set_val(XB360_X, get_val(XB360_BACK));
    // "unmap" Back
    set_val(XB360_BACK, 0);
}
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: Can't have two buttons mapped to same function?

Postby NonDuality » Sat Aug 30, 2014 9:14 pm

Silly me lol. Thanks a ton that works perfect!
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Re: Can't have two buttons mapped to same function?

Postby NonDuality » Mon Sep 01, 2014 1:44 pm

Could I bother you for a bit more help with my script please? I'd now like to have the RS button mapped to RB while keeping everything else the same.
User avatar
NonDuality
Staff Sergeant
Staff Sergeant
 
Posts: 15
Joined: Thu Aug 28, 2014 10:14 pm

Next

Return to Gtuner Plugins Support

Who is online

Users browsing this forum: No registered users and 35 guests