10 Unmaps and Remaps

Use this script when normal unmaps and remaps doesn't work for you. Please enjoy. - Token
Version1.20
Authortoken
Publish DateFri, 30 May 2014 - 02:08
Last UpdateSat, 31 May 2014 - 08:19
Downloads60
RATE


0

0

Release Notes: I added optional delays for remaps.
Code: Select all
int Delay1 = 0; // Delay for Newmap1. Time is in milliseconds. 0 means no delay.
int Delay2 = 0;
int Delay3 = 0;
int Delay4 = 0;
int Delay5 = 0;
int Delay6 = 0;
int Delay7 = 0;
int Delay8 = 0;
int Delay9 = 0;
int Delay10 = 0;
int Toggle = TRUE; // On by default. Change it to FALSE for off by default.
int ToggleComboButton1 = XB360_LB; // Toggle combination 1st button
int ToggleComboButton2 = XB360_RB; // Toggle combination 2nd button
int ToggleSingleButton = TRACE_1; // An optional single button toggle
int CurrentButton[20];
int NewButton[20];
int Unmap1 = XB360_Y; // Both Unmaps and Newmaps are required
int Newmap1 = XB360_RS;
int Unmap2 = TRACE_1;
int Newmap2 = TRACE_1;
int Unmap3 = TRACE_1;
int Newmap3 = TRACE_1;
int Unmap4 = TRACE_1;
int Newmap4 = TRACE_1;
int Unmap5 = TRACE_1;
int Newmap5 = TRACE_1;
int Unmap6 = TRACE_1;
int Newmap6 = TRACE_1;
int Unmap7 = TRACE_1;
int Newmap7 = TRACE_1;
int Unmap8 = TRACE_1;
int Newmap8 = TRACE_1;
int Unmap9 = TRACE_1;
int Newmap9 = TRACE_1;
int Unmap10 = TRACE_1;
int Newmap10 = TRACE_1;
main {
// There's 10 remaps. One is in use.
// There's a toggle for the remaps.
// There are optional delays for remaps.
if((get_val(ToggleComboButton1) && event_press(ToggleComboButton2)) || event_press(ToggleSingleButton)) Toggle = !Toggle;
if(Toggle == TRUE){
// 1st Remaps
CurrentButton[0] = Unmap1; // 1st Remap Arrays
NewButton[0]  = Newmap1;
set_val(CurrentButton[0], 0);
if(get_lval(CurrentButton[0]) && get_ptime((CurrentButton[0])) > Delay1) set_val(NewButton[0], 100);
 
// 2nd Remaps
CurrentButton[1] = Unmap2; // 2nd Remap Arrays
NewButton[1] = Newmap2;
set_val(CurrentButton[1], 0);
if(get_lval(CurrentButton[1]) && get_ptime((CurrentButton[1])) > Delay2) set_val(NewButton[1], 100);
 
// 3rd Remaps
CurrentButton[2] = Unmap3 // 3rd Remap Arrays
NewButton[2] = Newmap3
set_val(CurrentButton[2], 0);
if(get_lval(CurrentButton[2]) && get_ptime((CurrentButton[2])) > Delay3) set_val(NewButton[2], 100);
 
// 4th Remaps
CurrentButton[3] = Unmap4; // 4nd Remap Arrays
NewButton[3] = Newmap4;
set_val(CurrentButton[3], 0);
if(get_lval(CurrentButton[3]) && get_ptime((CurrentButton[3])) > Delay4) set_val(NewButton[3], 100);
 
// 5th Remaps
CurrentButton[4] = Unmap5 // 5th Remap Arrays
NewButton[4] = Newmap5
set_val(CurrentButton[4], 0);
if(get_lval(CurrentButton[4]) && get_ptime((CurrentButton[4])) > Delay5) set_val(NewButton[4], 100);
 
// 6th Remaps
CurrentButton[5] = Unmap6; // 6th Remap Arrays
NewButton[5] = Newmap6;
set_val(CurrentButton[5], 0);
if(get_lval(CurrentButton[5]) && get_ptime((CurrentButton[5])) > Delay6) set_val(NewButton[5], 100);
 
// 7th Remaps
CurrentButton[6] = Unmap7 // 7th Remap Arrays
NewButton[6] = Newmap7
set_val(CurrentButton[6], 0);
if(get_lval(CurrentButton[6]) && get_ptime((CurrentButton[6])) > Delay7) set_val(NewButton[6], 100);
 
// 8th Remaps
CurrentButton[7] = Unmap8; // 8th Remap Arrays
NewButton[7] = Newmap8;
set_val(CurrentButton[7], 0);
if(get_lval(CurrentButton[7]) && get_ptime((CurrentButton[7])) > Delay8) set_val(NewButton[7], 100);
 
// 9th Remaps
CurrentButton[8] = Unmap9 // 9th Remap Arrays
NewButton[8] = Newmap9
set_val(CurrentButton[8], 0);
if(get_lval(CurrentButton[8]) && get_ptime((CurrentButton[8])) > Delay9) set_val(NewButton[8], 100);
 
// 10th Remaps
CurrentButton[9] = Unmap10 // 10th Remap Arrays
NewButton[9] = Newmap10
set_val(CurrentButton[9], 0);
if(get_lval(CurrentButton[9]) && get_ptime((CurrentButton[9])) > Delay10) set_val(NewButton[9], 100);}
}