GPC Library

FORTNITE - FAST BUILD/SWAP HOTKEYS

THIS SCRIPT BY DEFAULT USES :
* FORTNITE EXPERT COMBAT LAYOUT
* PS4 CONTROLLER
* X-Aim EXTRA INPUTS

With this script you can bind 4 buttons to select any of the Fortnite build structures. It swaps to the desired item when already building, else it changes to build mode and swaps.

By default the buttons are binded to X-Aim extra inputs, change them!

Find more details on the script comment section!

SHARE FEEDBACK AND FEEL FREE TO COPY AND CHANGE THIS SCRIPT.
Version 1
Author wasini
Publish Date 2018-04-10 00:24:33
Update Date 2018-04-10 00:24:33
Downloads 539
RATE


5

1

Release Notes: Release version
Code:Select all
/* *********************************** Script made by Wasini ************************************** *
* This script default maping is for PS4 using the X-Aim plugin with the Expert Combat button layout,
* change them as you want to.
*
* BUTTONS DETAILS: ========================================================================
* o BUILD BUTTONS enters build mode if not already building and
*   swaps to the selected item, else, if already building, it just
*   swaps to the selected item.
*
* o BUILD BUTTON it's just your default building button, enters and leaves building mode.
*   **WARNING!!: When using the button to cancel menus or other functionalities it changes the state
*   of the building variable, so when you experience malfunction just press the SWAP BUTTON to reset the building state.**
*
* o SWAP BUTTON button to swap between Pickaxe and weapon selection also puts building mode OFF,
*   use it once when build mode is buggy.
*
* o MOVE_RIGHT and MOVE_LEFT are your buttons to cicle between buildings items
* =========================================================================================
* 
* Feel free to play with the buttons delays for better response, i think those settings are just fine.
*
* ************************************************************************************************* */

//--------- Build buttons ----------//
/* Default X-AIM Extra inputs, change the buttons at your will */
define WALL   = PS4_ACCX; 	// Swap to Wall
define FLOOR = PS4_ACCY; 	// Swap to Floor
define STAIRS = PS4_ACCZ;  	// Swap to Stairs
define ROOF   = PS4_GYROX;  // Swap to Roof

//--------- Swaping and building ----------//
define MOVE_RIGHT = PS4_R1; 		//Cicle build right
define MOVE_LEFT  = PS4_L1; 		//Cicle build left

define BUILD      = PS4_CIRCLE;		// Build button
define SWAP       = PS4_TRIANGLE;	// Swap Pickaxe/Weapons
//---------- Delays ------------//
define btnDelay   = 60; // Delay between press
define pressDelay = 90; // Button pressed time

//---------- State variables and constants -----------/

int building = FALSE; 			// Build flag
int currentBuildPointer = 0; 	// Current Build selected {0:Wall,1:Floor,2:Stairs,3:Roof}
int shift;						// Swap left or right shift times
define RIGHT = 1;
define LEFT = -1;


//--------------- Begin of main block ---------------//

main { 
	set_val(TRACE_1,building);
	// Enter building mode
	if(!building && event_press(BUILD)){
		currentBuildPointer = 0;
		building = TRUE;
		set_val(BUILD,0);
	}
	
	// Leave building mode
	if(event_press(SWAP) || (building && !get_lval(BUILD) && event_press(BUILD))) {
		building = FALSE;
	}

	//Enter building mode and choose selected build
	if(!building){
		if (event_press(FLOOR)) {
			combo_run(BUILD);
			shift = RIGHT;
		}
		
		if (event_press(WALL)) {
			combo_run(BUILD);
			shift = 0;
		}
		if (event_press(STAIRS)) {
			combo_run(BUILD);
			shift = 2*RIGHT;
		}
		if (event_press(ROOF)) {
			combo_run(BUILD);
			shift = LEFT;
		}
	}else if(!combo_running(BUILD)){  // Building mode is on
		
		// Update shift to swap at the selected build
		
		if (event_press(FLOOR) && !shift) {
			shift = 1 - currentBuildPointer;
		}
		
		if (event_press(WALL) && !shift) {
			if(currentBuildPointer == 3){
				shift = 1;
			} else{
			shift = 0 - currentBuildPointer;
			} 
		}
		
		if (event_press(STAIRS) && !shift) {
			shift = 2 - currentBuildPointer;
		}
		
		if (event_press(ROOF) && !shift) {
			if(!currentBuildPointer){
				shift = -1;
			} else {
			shift = 3 - currentBuildPointer;
			}
		}
		
		// When swaping builds with buttons update the currentBuildPointer
		if (event_press(MOVE_RIGHT)){
			move_pointer(RIGHT);
		}
		if (event_press(MOVE_LEFT)){
			move_pointer(LEFT);
		}
		
		// If there's shifts left to do swap right or left till shift is zero
		if (shift != 0 && !swaping()) {
			if(shift > 0){
				shift--;
				combo_run(SWAP_RIGHT);
			} else {
				shift++;
				combo_run(SWAP_LEFT);
			}
		}
		set_val(TRACE_2,currentBuildPointer);
		
	}
}

//--------------- End of main block ---------------//


//--------------- Begin of combo section ---------------//

/* Enters to bulild mode */
combo BUILD {
	set_val(PS4_CIRCLE,100);
	wait(pressDelay);
	wait(btnDelay);
	currentBuildPointer = 0;
	building = TRUE;
}

/* Swap build selection right one time */
combo SWAP_RIGHT {
	set_val(MOVE_RIGHT, 100);
	wait(pressDelay);
	wait(btnDelay);
	move_pointer(RIGHT);
}

/* Swap build selection left one time */
combo SWAP_LEFT {
	set_val(MOVE_LEFT, 100);
	wait(pressDelay);
	wait(btnDelay);
	move_pointer(LEFT);
}

//--------------- End of combo section ---------------//

//--------------- Begin of functions section ---------------//

//* Returns true if any SWAP combo is running */
function swaping(){
	return (combo_running(SWAP_RIGHT) || combo_running(SWAP_LEFT))
}

/* Updates currentBuildPointer with the new value after swaping RIGHT or LEFT */
function move_pointer(value){
	if(value == RIGHT){
		currentBuildPointer = (currentBuildPointer + 1) % 4;
	}else {
		if(currentBuildPointer){
			currentBuildPointer--;
		} else
			currentBuildPointer = 3;
	}
}	

//--------------- End of functions section ---------------//



  • Rating

    10 / 10 here !

    If you own a ps3 and prefer an xbox controller, or even use a keyboard and mouse, this is a must to remap your keyboard to a controller. Go buy it now you won't be disappointed !

  • Rating

    Amazing device

    If you're like me and love your PS4 controller but want to use an Xbox One GET THIS you won't be sorry.

  • Rating

    Worth every penny

    The controller feels and performs as it does on the xbox right there on my ps3, awesome job guys, and worth every penny !!!

  • Rating

    Amazing Macro combos

    tested Super Street Fighter IV Arcade Edition. I was able to perform normal & FADC combos with some characters like Ryu and Ken with a single click. Amazing.

  • Rating

    As good as a XIM

    If you are a pc gamer, that needs a pc solution for console, get yourself a CronusMAX you will not regret it.

  • Rating

    KB & Mouse RULES!

    All I can say playing 10 minutes with CronusMAX properly configured it felt better then PC....YES I said it even better then PC, it's that smooth.

  • Rating

    Six-Axis 360!

    WOW! I can finally get that six-axis awesomeness on my Xbox 360. The best money I ever spent.

  • Rating

    Beats all rapidfire mods

    I've tried the Intensafire, Godfather even the new Wolf controller. The CronusMAX beats them hands down and no wires or soldering too. 5 Stars!

  • Rating

    Just perfect!

    I can't believe how much this can do for the price tag - it blew me away. Best controller upgrade ever.

  • Rating

    Hugh Thanks!

    Without your help I couldn't be playing Xbox, thanks guys.

  • Rating

    Wow!

    I have to say after reading the forums for Destiny Mouse and Keyboard setup I was flying into getting it set up in 20 minutes. It works outstanding! I'm more then satisfied and its worth every penny!

  • Rating

    Achievement Unlocked!

    Idle boosting Complete 150 Multiplayer games, James Cameron's Avatar. My friend said it would be hard, I laughed then linked him.

  • Rating

    A++!

    Now this is a company you can count on and trust...keep up the great work guys!

  • Rating

    What Disability?

    I would like to thank you for making the CronusMax. I have this problem hitting L3 and R3, and today that problem was fixed. I love the remap feature on the Cronus max. You made my life easier.

  • Rating

    Awesome stuff guys!

    Playing Forza 5 with my original MS 360 wireless wheel makes the XB1 complete for me, thanks to the CronusMax. Thumbs up!