/*
Script originally made by WiiMot3 (Thanks!!!) for Rainbow Six: Siege, now adapted for FORTNITE (PS4)
Modified by T-Rex - Fortnite script with layout "Combat Pro".
Version 1.00 - 03/11/2018
- Basics commands to play well in the Fortnite
- Script based in control layout mode "COMBAT PRO" (you need change the layout in the Fortnite's control options).
- Based with no motions, but there a problem to be resolved in the next update: the gyro motion of the Wiimote is moving values in the options (not affect the gameplay, as far as I know), then don't twist the wiimote during the option screen.
*/
unmap ALL_REMAPS;
remap WII_C -> PS4_R3;
remap WII_Z -> PS4_L2;
remap WII_NX -> PS4_LX;
remap WII_NY -> PS4_LY;
remap WII_IRX -> PS4_RX;
remap WII_IRY -> PS4_RY;
remap WII_UP -> PS4_TRIANGLE;
remap WII_DOWN -> PS4_CROSS;
remap WII_LEFT -> PS4_L1;
remap WII_RIGHT -> PS4_R1;
remap WII_B -> PS4_R2;
remap WII_A -> PS4_L3;
remap WII_MINUS -> PS4_SQUARE;
remap WII_HOME -> PS4_OPTIONS;
remap WII_PLUS -> PS4_CIRCLE;
remap WII_ONE -> PS4_UP;
remap WII_TWO -> PS4_TOUCH;
// remap WII_ACCNZ -> PS4_L1;
// remap WII_ACCNX -> PS4_SQUARE;
// remap WII_ACCNY -> ;
// remap WII_RT -> ;
// remap WII_ZR -> PS4_RIGHT;
// remap WII_RX -> PS4_SHARE;
// remap WII_RY -> PS4_OPTIONS;
remap WII_X -> PS4_PS;
// remap WII_Y -> PS4_TOUCH;
// OBS 1: The commands D-Pad Left and Right is good for L1 and R1, respectively, to easy manage of the weapon/constructor choice.
// OBS 2: Initially, the map button was assigned to Home Button, but when playing,
// it's a bit hard to press the button because the button is very shallow.
// then i changed to button Two. You can reverse the Two with One, if wish.
// I prefer the One, because is near, easy and fast for thumb to access the inventory.
int LeftRight;
int Var_Option;
int IR_OFF, IR;
main {
// Nunchuk (Joystick)
sensitivity(WII_NX , NOT_USE, 150);
sensitivity(WII_NY , NOT_USE, 150);
stickize(PS4_LX, PS4_LY, 140); // original Wiimot3's value was 100 -- With 140, the radius is close to 100% for diagonal movements.
deadzone(WII_NX, WII_NY, DZ_CIRCLE, 2); // 5
// Wiimote (IR)
set_val(WII_IRX, inv(get_val(WII_IRX)));
sensitivity(WII_IRX , NOT_USE, 120); // original Wiimot3's value was 110
sensitivity(WII_IRY , NOT_USE, 110);
deadzone(WII_IRX, WII_IRY, DZ_CIRCLE, 7); // original Wiimot3's value was 10
stickize(PS4_RX, PS4_RY, 141);
// DEACTIVATED MOTION *******************************************
// ****************************************************** START 1
// Reload
// if (get_val(WII_ACCZ) > 20 && get_val(WII_ACCY) < 20) {
// combo_run(Reload);}
// if (get_val(WII_ACCNX) <= -15){
// LeftRight = LeftRight + 1;}else{LeftRight = 0}
// if (LeftRight >= 10){LeftRight = 10;}
// if (LeftRight >= 9){set_val(WII_ACCNX, 100);}else{set_val(WII_ACCNX, 0);}
// Cut
// if (get_val(WII_ACCX) > 50){
// combo_run(Cut);}
// Crouch/Prone
// if (get_val(WII_ACCNZ) > 20){
// set_val(WII_ACCNZ, 100);
// combo_run(prone);}else{set_val(WII_ACCNZ, 0);}
// ******************************************************** END 1
// DEACTIVATED MOTION *******************************************
// Touch/Start/PS
Var_Option = 0;
if (Var_Option == 0){
if(get_val(WII_TWO) && (get_ptime(WII_TWO) > 1500)) {
set_val(WII_X, 100);} // Holding activates the PS button
if(event_release(WII_TWO) && ((get_ptime(WII_TWO) > 0) && (get_ptime(WII_TWO) < 1500))) {
combo_run(select);}} // Tapping the button show the map
// OBS: The value ~1500 is important for Screen Menu, because pressed the button activate the Fortnite chat first, then continues pressing a little more activate the PS Menu. If Fortnite chat is not important for you, reduces the value to 600, if prefer.
// IR OFF
if(wiir_offscreen()) {
IR_OFF = IR_OFF+1;
if (IR_OFF >= 300){IR_OFF = 300;}}else{IR_OFF = 0;}
if(IR_OFF >= 300) {
set_val(WII_IRX, 0);
set_val(WII_IRY, 0);}
}
// DEACTIVATED MOTION *******************************************
// ****************************************************** START 2
// combo Reload {
// set_val(WII_ACCNX, 100);
// set_rumble(RUMBLE_B, 100);
// wait(100);
// set_rumble(RUMBLE_B, 0);}
// ******************************************************** END 2
// DEACTIVATED MOTION 2 *****************************************
combo Cut {
set_val(WII_ZR, 100);
set_rumble(RUMBLE_B, 100);
wait(100);
set_val(WII_ZR, 0);
set_rumble(RUMBLE_B, 0);}
combo prone {
set_rumble(RUMBLE_A, 100);
wait(100);
set_rumble(RUMBLE_A, 0);}
combo select {
Var_Option = 1;
if (Var_Option == 1) {
if(get_val(WII_TWO)) {
combo_run(start);}}
wait(200);
set_val(WII_Y, 100);
wait(200);}
combo start {
Var_Option = 2;
set_val(WII_RY, 100);
combo_stop(select);
wait(200);}