KB + XIM + Titan2 - Fortnite Combos

GPC2 script programming for Titan Two. Code examples, questions, requests.

Re: KB + XIM + Titan2 - Fortnite Combos

Postby geekdll » Sat Mar 17, 2018 7:01 am

DirtyLarry wrote:
geekdll wrote:
DirtyLarry wrote:I copied the script and get this error msg when attempting to compile and save it.


"GPC error: FN.gpc(5): Can't open include file 'light_k.gph'"

What am I missing?


I am also getting this error



Just received the answer.

search for "light_k.gph". You need to download it and put it in the same directory/folder as your script.


online resources , then gpc headers


Thanks got it
User avatar
geekdll
Sergeant
Sergeant
 
Posts: 6
Joined: Fri Mar 16, 2018 6:10 am

Re: KB + XIM + Titan2 - Fortnite Combos

Postby Artryt » Tue Mar 20, 2018 8:34 am

Hi, first thing I want to say is thanks to all you people who contribute to the forums I am enjoying reading all the info even if it does go over my head at times :shocked:

Right then, I have a T2 in the post :joia: and I'm tracking its movement by the day/second :whistling:

My question's Are 1. I'm under the impression Mal's script is geared towards a Logitech G502 with a Sony nav? I'm going to be running the same setup when the T2 arrives. Apex, nav, G502 and T2 :smile0202:
2. I was wondering if the script will need to be adjusted with regards to button layout on the nav/mouse? Having watched the video by redacted, I'm sure I can accomplish what he shows or at least I hope I can and I've read about adjusting the response times to suit our personal internet connections and would hope to also be ok to accomplish that too. My final request is could you please clarify the order to connect everything up as you do with your setup's please, ie Xbox-Apex-Apex hub-T2/port 2 on Apex hub- nav to port x on T2 mouse to port y on T2 etc etc. I have read so much, the only thing I'm certain about is the Apex starts the chain from the Xbox or finishes depending on your perspective. Thanks for sharing your script Mal I can't wait to have it up and running :smile0517: and thanks to anyone who can help with my questions.
User avatar
Artryt
Sergeant
Sergeant
 
Posts: 6
Joined: Sun Mar 18, 2018 3:57 am

Re: KB + XIM + Titan2 - Fortnite Combos

Postby MAL8010 » Tue Mar 20, 2018 8:52 am

Artryt wrote:Hi, first thing I want to say is thanks to all you people who contribute to the forums I am enjoying reading all the info even if it does go over my head at times :shocked:

Right then, I have a T2 in the post :joia: and I'm tracking its movement by the day/second :whistling:

My question's Are 1. I'm under the impression Mal's script is geared towards a Logitech G502 with a Sony nav? I'm going to be running the same setup when the T2 arrives. Apex, nav, G502 and T2 :smile0202:
2. I was wondering if the script will need to be adjusted with regards to button layout on the nav/mouse? Having watched the video by redacted, I'm sure I can accomplish what he shows or at least I hope I can and I've read about adjusting the response times to suit our personal internet connections and would hope to also be ok to accomplish that too. My final request is could you please clarify the order to connect everything up as you do with your setup's please, ie Xbox-Apex-Apex hub-T2/port 2 on Apex hub- nav to port x on T2 mouse to port y on T2 etc etc. I have read so much, the only thing I'm certain about is the Apex starts the chain from the Xbox or finishes depending on your perspective. Thanks for sharing your script Mal I can't wait to have it up and running :smile0517: and thanks to anyone who can help with my questions.


That is the setup I currently run. I would say if you are just as comfortable with a KB I'd use that over the Nav. I can't get the Nav to passthrough to the APEX in the same way I could with the XIM4, there is a workaround but it doesn't give perfect analogue movement, more of a hybrid between analogue and WASD. I'll share the process to do that if you decide to still use a NAV.

The key question when it comes to connectivity is what device are you using to execute the build macros? If it is a mouse (like I do) then you need the mouse connected to the T2 and if you then want a XIM to handle the mouse translation you need the T2 connected to the XIM and XIM to console.

So my setup is NAV and Mouse into T2, Controller and T2 into APEX, APEX into console.

I'll be posting a better step by step guide to the 2 common connection styles shortly.
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: KB + XIM + Titan2 - Fortnite Combos

Postby Artryt » Tue Mar 20, 2018 9:03 am

MAL8010 wrote:
Artryt wrote:Hi, first thing I want to say is thanks to all you people who contribute to the forums I am enjoying reading all the info even if it does go over my head at times :shocked:

Right then, I have a T2 in the post :joia: and I'm tracking its movement by the day/second :whistling:

My question's Are 1. I'm under the impression Mal's script is geared towards a Logitech G502 with a Sony nav? I'm going to be running the same setup when the T2 arrives. Apex, nav, G502 and T2 :smile0202:
2. I was wondering if the script will need to be adjusted with regards to button layout on the nav/mouse? Having watched the video by redacted, I'm sure I can accomplish what he shows or at least I hope I can and I've read about adjusting the response times to suit our personal internet connections and would hope to also be ok to accomplish that too. My final request is could you please clarify the order to connect everything up as you do with your setup's please, ie Xbox-Apex-Apex hub-T2/port 2 on Apex hub- nav to port x on T2 mouse to port y on T2 etc etc. I have read so much, the only thing I'm certain about is the Apex starts the chain from the Xbox or finishes depending on your perspective. Thanks for sharing your script Mal I can't wait to have it up and running :smile0517: and thanks to anyone who can help with my questions.


That is the setup I currently run. I would say if you are just as comfortable with a KB I'd use that over the Nav. I can't get the Nav to passthrough to the APEX in the same way I could with the XIM4, there is a workaround but it doesn't give perfect analogue movement, more of a hybrid between analogue and WASD. I'll share the process to do that if you decide to still use a NAV.

The key question when it comes to connectivity is what device are you using to execute the build macros? If it is a mouse (like I do) then you need the mouse connected to the T2 and if you then want a XIM to handle the mouse translation you need the T2 connected to the XIM and XIM to console.

So my setup is NAV and Mouse into T2, Controller and T2 into APEX, APEX into console.

I'll be posting a better step by step guide to the 2 common connection styles shortly.


Hi, Mal thanks.
When I have everything in hand I would appreciate the pointers to getting it going with a nav to see how it feels in game :smile0517: and failing that I'm open to using a keyboard for sure. Personally i find it more relaxing with my left arm where ever it wants to be with a nav or joycon in my hand as opposed to stuck on a keyboard haha.
User avatar
Artryt
Sergeant
Sergeant
 
Posts: 6
Joined: Sun Mar 18, 2018 3:57 am

Re: KB + XIM + Titan2 - Fortnite Combos

Postby MAL8010 » Tue Mar 20, 2018 9:34 am

A step by step guide...

1. If you use a Mouse for the build macros within this script then the mouse has to be connected to the T2. If you then want a XIM to handle mouse translation the T2 has to be connected to the XIM.

Also, all inputs that the script relies on needs to be connected to the T2 and not directly to the XIM - so for example the script needs to know when you've entered Inventory, Game Menu, Console Menu, Emotes - because the way to cancel out of this is the SAME button as BUILD - hence the script recognises this and rather than the internal tracking entering build mode when you cancel out of a menu it recognises you've actually just cancelled out of a menu. The same applies with LB/RB as of course the script monitors this for tracking etc.

On the assumption a KB is used for most of the menu inputs above and a mouse is used to execute the building macros then this is connection method:

- Mouse and KB into T2
- Controller into Port 1 of XIM APEX
- T2 into Port 2 of XIM APEX
- XIm APEX into Console
- In Gtuner set Output Protocol to USB Multi Interface HID and Check Disable Joystick

2. Setup your keybindings in the Input Translator under Keyboard and Mouse Mapping. An example is shown below.

Image

Note: For extra mouse buttons it is easier to map them to a KB key in your mouse software. So for example I use a G502 and thus map the side buttons to B, N, J in the Logitech software. As these are Kb keys they are then mapped to the associated controller entry under Keyboard Mapping in the Input Translator.

3. Setup the appropriate key mappings in the Script

Code: Select all
#define Wall (KEY_B)
#define Floor (KEY_N)
#define Stair (KEY_J)
#define RB (KEY_E)
#define LB (KEY_Q)
#define Build (KEY_N)
#define Fire (MBUTTON_1)


Also define your reset button

Code: Select all
#define Reset BUTTON_13 //manual reset of tracking (right arrow)


For me this is right arrow (unused by the game) which is mapped to KEY_L in Input Translator and this is actually my mouse wheel button.

4. Combos - you need to make sure mouse_set and key_set are being correctly applied. These of course refer to the end output (remember any side mouse buttons mapped to a key are actually key_set and not mouse_set). So using the keys defined above you can see they are all KB keys except fire which is of course MBUTTON1.

Therefore a combo would look like this

Code: Select all
combo BuildWall {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(BeforeFireButton_Wait1);
   wait(BeforeFireButton_Wait2);
   mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 1;
    mode = 1;
}


For me personally as a NAV user (i.e. limited buttons relative to a KB) I use mouse wheel scroll up / down for RB/LB and thus the combo's need to change to reflect the fact it's a mouse output not a key output. If this is the case you don't need a LB define, just an RB one like this:

Code: Select all
#define RB (MOUSE_WHEEL)


With Wheel Backward mapped to BUTTON_4 and Wheel Forward mapped to BUTTON_7 in mouse mapping in the Input Translator.

Then combos would look like this:

Code: Select all
combo BuildStair {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 3;
    mode = 1;
}
 
combo QLB1 {
    wait(InitailEnd_Wait);
    mouse_set(RB, 1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}


Note the use of mouse_set over key_set and also the fact that mouse wheel forward is +1, mouse wheel backward is -1.

5. Network latencty - I connect to EU servers with a circa 20ms ping. The timings in the combo reflect this i.e. wait times between button presses. If you have a much higher latency these timings might be too short and could result in the combo's not working correctly. If this is the case then increase the wait times in the define at the start of the script.

Code: Select all
#define InitailEnd_Wait 20
#define SameButton_Wait 40
#define GenericBetweenButton_Wait 50
#define BeforeFireButton_Wait1 50
#define BeforeFireButton_Wait2 100


6. Download light_k header file from Online Resources and save it in the same directory as the script.

7. Setup your keybinds in XIM in the normal way.

8. Make sure game settings are set to

- Combat Pro controller layout
- Turbo building ON
- Reset Building Choice ON

That should be everything I think! The display on T2 reflects the Building mode (red for building, green for combat) and the numbers reflect the building piece currently selected (1-4, 0 for combat mode). Thus in game you can see if the tracking is correct. If incorrect at any time just move to back to combat mode and press your RESET button.

So this would be an example script if using a KB with keys for RB/LB

Code: Select all
#pragma METAINFO("<Mark>", 1, 0, "FORTNITE") 
 
#include <keyboard.gph>
#include <display.gph>
#include "light_k.gph"
#include <mouse.gph>
#define Reset BUTTON_13 //manual reset of tracking (right arrow)
#define Wall (KEY_F)
#define Floor (KEY_V)
#define Stair (KEY_C)
#define InitailEnd_Wait 20
#define SameButton_Wait 40
#define GenericBetweenButton_Wait 50
#define BeforeFireButton_Wait1 50
#define BeforeFireButton_Wait2 100
#define RB (KEY_E)
#define LB (KEY_Q)
#define Build (KEY_N)
#define Fire (MBUTTON_1)
 
 
 
//mode and tracker
int mode;
int bldvalue;
int NavState;
 
//building hotkeys and tracker
int bldslottrack=1;
bool event_active_b;
bool event_active_n;
bool event_active_f;
 
main {
 
    mouse_passthru();
    key_passthru();
 
//------------------------------------------------------------------------------
//MODE TRACKING
 
    if (mode == 0) {
        set_light('G');
        }
 
    if (mode == 1) {
        set_light('R');
        }
 
    if (mode > 1) {
        mode = 0;}
 
    if ((event_release(BUTTON_15)) && (mode == 0)){
            mode = 1; //building mode
            }
 
    else if (event_release(BUTTON_15) && (mode == 1)) {
            mode = 0; //combat mode
            bldslottrack = 1; //building always resets to slot 1, weapons to last occupied slot
            }
 
//------------------------------------------------------------------------------
//BUILDING AND WEAPON SLOT TRACKING
 
    //Building to axe - has to return to slot 1
    if ((event_release(BUTTON_14)) && (mode == 1)) {
        mode = 0;
        bldslottrack = 1;
        }
 
    if ((event_release(BUTTON_4)) && (mode == 1)) {
        bldslottrack = bldslottrack + 1;
            if (bldslottrack > 4) {
                bldslottrack = 1;
            }
        }
 
    if ((event_release(BUTTON_7)) && (mode == 1)) {
        bldslottrack = bldslottrack - 1;
            if (bldslottrack < 1) {
                bldslottrack = 4;
            }
        }
 
//------------------------------------------------------------------------------
//TRACKER RESETS
 
    //manual tracker reset to weapon mode slot1
    if (event_active(Reset)) {
        mode = 0;
        bldslottrack = 1;
    }
 
    //Since B is cancel as well as enter building mode, need to reset tracker if using to cancel out of xbox menu, inventory, game menu, emotes
    if (event_release (BUTTON_1) || event_release (BUTTON_3) || event_release (BUTTON_10) || event_release (BUTTON_11)) {
        NavState = 1;}
 
    // Pressing B to cancel resets
    if (event_release (BUTTON_15) && NavState) {
        mode = mode + 1;
        NavState = 0;}
 
//------------------------------------------------------------------------------
// LOAD-OUTS
 
       if(key_status(Wall)) {
            bldvalue = 1 -  bldslottrack;
            if(!event_active_b) {
                event_active_b = TRUE;
                if (mode == 0){ //weapons or pickaxe to wall
                    combo_run (BuildWall);
                }     else if ((mode == 1) && (bldvalue == 0)) { //already have wall selected
                        combo_run (RT);}
                    else { //moving from building slots 2,3,4 to wall
                        if (bldvalue == -1) {
                            combo_run (QLB1);
                            bldslottrack = 1;}
                        if (bldvalue == -2) {
                            combo_run (QLB2);
                            bldslottrack = 1;}
                        if (bldvalue == -3) {
                            combo_run (QRB1);
                            bldslottrack = 1;}
                    }
                }
        } else event_active_b = FALSE;
 
        if(key_status(Floor))  {
                bldvalue = 2 -  bldslottrack;
                if(!event_active_f) {
                    event_active_f = TRUE;
                    if (mode == 0){
                        combo_run (BuildFloor);
                    }    else if    ((mode == 1) && (bldvalue == 0)) {
                            combo_run (RT);}
                        else {   
                            if (bldvalue == 1) {
                                combo_run (QRB1);
                                bldslottrack = 2;}
                            if (bldvalue == -1) {
                                combo_run (QLB1);
                                bldslottrack = 2;}
                            if (bldvalue == -2) {
                                combo_run (QLB2);
                                bldslottrack = 2;}
                    }
                }
        } else event_active_f = FALSE;   
 
        if(key_status(Stair))    { 
                bldvalue = 3 -  bldslottrack;
                if(!event_active_n) {
                    event_active_n = TRUE;
                    if (mode == 0){
                        combo_run (BuildStair);
                    } else if ((mode == 1) && (bldvalue == 0)) {
                        combo_run (RT);}
                      else {
                          if (bldvalue == 2) {
                              combo_run (QLB2);
                              bldslottrack = 3;}
                          if (bldvalue == 1) {
                              combo_run (QRB1);
                              bldslottrack = 3;}
                          if (bldvalue == -1) {
                              combo_run (QLB1);
                              bldslottrack = 3;}
                    }
                }
        } else event_active_n = FALSE;   
 
//------------------------------------------------------------------------------
//LED                   
        if (mode == 1){           
        switch(bldslottrack) {
                case 0: display_overlay(_0_, 2000); break;
                case 1: display_overlay(_1_, 2000); break;
                case 2: display_overlay(_2_, 2000); break;
                case 3: display_overlay(_3_, 2000); break;
                case 4: display_overlay(_4_, 2000); break;
            }
        }
 
        if (mode == 0) {
            display_overlay(_0_, 2000); }   
 
} // main
 
combo BuildWall {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 1;
    mode = 1;
}
 
combo BuildFloor {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(GenericBetweenButton_Wait);
    key_set(RB, 1);
    wait(SameButton_Wait);
    key_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 2;
    mode = 1;
}
 
combo BuildStair {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(GenericBetweenButton_Wait);
    key_set(RB, 1);
    wait(SameButton_Wait);
    key_set(RB, 0);
    wait(GenericBetweenButton_Wait);
    key_set(RB, 1);
    wait(SameButton_Wait);
    key_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 3;
    mode = 1;
}
 
combo QLB1 {
    wait(InitailEnd_Wait);
    key_set(LB, 1);
    wait(SameButton_Wait);
    key_set(LB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
combo QLB2 {
    wait(InitailEnd_Wait);
    key_set(LB, 1);
    wait(SameButton_Wait);
    key_set(LB, 0);
    wait(GenericBetweenButton_Wait);
    key_set(LB, 1);
    wait(SameButton_Wait);
    key_set(LB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
combo QRB1 {
    wait(InitailEnd_Wait);
    key_set(RB, 1);
    wait(SameButton_Wait);
    key_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}   
 
combo RT {
    wait(InitailEnd_Wait);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
 
 
 


This would be an example script if using mouse wheel scroll for RB/LB

Code: Select all
#pragma METAINFO("<Mark>", 1, 0, "FORTNITE BUILDING ONLY - MOUSE PT") 
 
#include <keyboard.gph>
#include <display.gph>
#include "light_k.gph"
#include <mouse.gph>
 
#define Reset BUTTON_13 //manual reset of tracking (right arrow)
#define Wall (KEY_B)
#define Floor (KEY_N)
#define Stair (KEY_J)
#define InitailEnd_Wait 20
#define SameButton_Wait 40
#define GenericBetweenButton_Wait 50
#define BeforeFireButton_Wait1 50
#define BeforeFireButton_Wait2 100
#define RB (MOUSE_WHEEL)
#define Build (KEY_END)
#define Fire (MBUTTON_1)
 
//mode and tracker
int mode;
int bldvalue;
int NavState;
 
//building hotkeys and tracker
int bldslottrack=1;
bool event_active_b;
bool event_active_n;
bool event_active_f;
 
main {
 
    mouse_passthru();
    key_passthru();
 
//------------------------------------------------------------------------------
//MODE TRACKING
 
    if (mode == 0) {
        set_light('G');
        }
 
    if (mode == 1) {
        set_light('R');
        }
 
    if (mode > 1) {
        mode = 0;}
 
    if ((event_release(BUTTON_15)) && (mode == 0)){
            mode = 1; //building mode
            }
 
    else if (event_release(BUTTON_15) && (mode == 1)) {
            mode = 0; //combat mode
            bldslottrack = 1; //building always resets to slot 1, weapons to last occupied slot
            }
 
//------------------------------------------------------------------------------
//BUILDING AND WEAPON SLOT TRACKING
 
    //Building to axe - has to return to slot 1
    if ((event_release(BUTTON_14)) && (mode == 1)) {
        mode = 0;
        bldslottrack = 1;
        }
 
    if ((event_release(BUTTON_4)) && (mode == 1)) {
        bldslottrack = bldslottrack + 1;
            if (bldslottrack > 4) {
                bldslottrack = 1;
            }
        }
 
    if ((event_release(BUTTON_7)) && (mode == 1)) {
        bldslottrack = bldslottrack - 1;
            if (bldslottrack < 1) {
                bldslottrack = 4;
            }
        }
 
//------------------------------------------------------------------------------
//TRACKER RESETS
 
    //manual tracker reset to weapon mode slot1
    if (event_active(Reset)) {
        mode = 0;
        bldslottrack = 1;
    }
 
    //Since B is cancel as well as enter building mode, need to reset tracker if using to cancel out of xbox menu, inventory, game menu, emotes
    if (event_release (BUTTON_1) || event_release (BUTTON_3) || event_release (BUTTON_10) || event_release (BUTTON_11)) {
        NavState = 1;}
 
    // Pressing B to cancel resets
    if (event_release (BUTTON_15) && NavState) {
        mode = mode + 1;
        NavState = 0;}
 
//------------------------------------------------------------------------------
// LOAD-OUTS
 
       if(key_status(Wall)) {
            bldvalue = 1 -  bldslottrack;
            if(!event_active_b) {
                event_active_b = TRUE;
                if (mode == 0){ //weapons or pickaxe to wall
                    combo_run (BuildWall);
                }     else if ((mode == 1) && (bldvalue == 0)) { //already have wall selected
                        combo_run (RT);}
                    else { //moving from building slots 2,3,4 to wall
                        if (bldvalue == -1) {
                            combo_run (QLB1);
                            bldslottrack = 1;}
                        if (bldvalue == -2) {
                            combo_run (QLB2);
                            bldslottrack = 1;}
                        if (bldvalue == -3) {
                            combo_run (QRB1);
                            bldslottrack = 1;}
                    }
                }
        } else event_active_b = FALSE;
 
        if(key_status(Floor))  {
                bldvalue = 2 -  bldslottrack;
                if(!event_active_f) {
                    event_active_f = TRUE;
                    if (mode == 0){
                        combo_run (BuildFloor);
                    }    else if    ((mode == 1) && (bldvalue == 0)) {
                            combo_run (RT);}
                        else {   
                            if (bldvalue == 1) {
                                combo_run (QRB1);
                                bldslottrack = 2;}
                            if (bldvalue == -1) {
                                combo_run (QLB1);
                                bldslottrack = 2;}
                            if (bldvalue == -2) {
                                combo_run (QLB2);
                                bldslottrack = 2;}
                    }
                }
        } else event_active_f = FALSE;   
 
        if(key_status(Stair))    { 
                bldvalue = 3 -  bldslottrack;
                if(!event_active_n) {
                    event_active_n = TRUE;
                    if (mode == 0){
                        combo_run (BuildStair);
                    } else if ((mode == 1) && (bldvalue == 0)) {
                        combo_run (RT);}
                      else {
                          if (bldvalue == 2) {
                              combo_run (QLB2);
                              bldslottrack = 3;}
                          if (bldvalue == 1) {
                              combo_run (QRB1);
                              bldslottrack = 3;}
                          if (bldvalue == -1) {
                              combo_run (QLB1);
                              bldslottrack = 3;}
                    }
                }
        } else event_active_n = FALSE;   
 
//------------------------------------------------------------------------------
//LED                   
        if (mode == 1){           
        switch(bldslottrack) {
                case 0: display_overlay(_0_, 2000); break;
                case 1: display_overlay(_1_, 2000); break;
                case 2: display_overlay(_2_, 2000); break;
                case 3: display_overlay(_3_, 2000); break;
                case 4: display_overlay(_4_, 2000); break;
            }
        }
 
        if (mode == 0) {
            display_overlay(_0_, 2000); }   
 
} // main
 
combo BuildWall {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 1;
    mode = 1;
}
 
combo BuildFloor {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 2;
    mode = 1;
}
 
combo BuildStair {
    wait(InitailEnd_Wait);
    key_set(Build, 1);
    wait(SameButton_Wait);
    key_set(Build, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
    bldslottrack = 3;
    mode = 1;
}
 
combo QLB1 {
    wait(InitailEnd_Wait);
    mouse_set(RB, 1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
combo QLB2 {
    wait(InitailEnd_Wait);
    mouse_set(RB, 1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(GenericBetweenButton_Wait);
    mouse_set(RB, 1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
combo QRB1 {
    wait(InitailEnd_Wait);
    mouse_set(RB, -1);
    wait(SameButton_Wait);
    mouse_set(RB, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}   
 
combo RT {
    wait(InitailEnd_Wait);
    mouse_set(Fire, 1);
    wait(SameButton_Wait);
    mouse_set(Fire, 0);
    wait(InitailEnd_Wait);
}
 
 
 
 
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: KB + XIM + Titan2 - Fortnite Combos

Postby MAL8010 » Tue Mar 20, 2018 10:08 am

Using a NAV over a KB with the APEX requires some changes. The way I used to use a NAV with XIM4 no longer works and thus this is a workaround that doesn't give perfect analogue movement. It's the solution outlined by Paname earlier in this thread.

So add the code below to the relevant parts of the script and amend your NAV bindings - as you can see they are set to KB keys.

Code: Select all
 
#ifndef PS3NAV_GPH_
#define PS3NAV_GPH_
#include <ps3.gph>
 
 
fix32 minv2 = 23.00*23.00 ; //  adjust so resting position never register.
 
init {
    mousemapping();
    keymapping();
}
 
main {
 
//------------------------------------------------------------------------------
//NAV MAPPING
 
    if (get_actual(PS3_UP)) { key_set(KEY_UPARROW,1);}
    if (get_actual(PS3_L1)) { key_set(KEY_P,1); }
    if (get_actual(PS3_L2)) { key_set(KEY_SPACEBAR,1); }
    if (get_actual(PS3_L3)) { key_set(KEY_LEFTSHIFT,1); }
    if (get_actual(PS3_PS)) { key_set(KEY_ESCAPE,1); }
    if (get_actual(PS3_DOWN)) { key_set(KEY_DOWNARROW  ,1); }
    if (get_actual(PS3_LEFT)) { key_set(KEY_LEFTARROW  ,1); }
    if (get_actual(PS3_RIGHT)) { key_set(KEY_RIGHTARROW  ,1); }
    if (get_actual(PS3_UP)) { key_set(KEY_UPARROW,1);}
    if (get_actual(PS3_CIRCLE)) { key_set(KEY_H,1);}
    if (get_actual(PS3_CROSS)) { key_set(KEY_G,1);}
    if (get_actual(PS3_SELECT)) { key_set(KEY_V,1);}
    if (get_actual(PS3_TRIANGLE)) { key_set(KEY_Y,1);}
 
 
    if (get_actual(STICK_2_X)||get_actual(STICK_2_Y)) {
            set_val(STICK_2_X,0);
            set_val(STICK_2_Y,0);
            WASD(STICK_2_X,STICK_2_Y);
            }
}
 
// Functions
 
 
void WASD(uint8 io_x, uint8 io_y){
    fix32 rx = get_actual(io_x) ;
    fix32 ry = get_actual(io_y) ;
    fix32 ovl = 10.00;   // 20 degrees overlap so diagonals movement also register
 
    fix32 angle = atan2(ry,rx) * 180.00 / PI;
    fix32 radius2 = rx*rx + ry*ry ;
 
    if ( radius2 >= minv2 ) {
 
        //W
        if ( angle < (-45.00+ovl)  && angle > (-135.00-ovl) ) { key_set(KEY_W,1);}
 
        //A
        if ( abs(angle) > (135.00-ovl) ) { key_set(KEY_A,1);}
 
        //S
        if ( angle > (45.00-ovl)  && angle < (135.00+ovl) ) { key_set(KEY_S,1);}
 
        //D
        if (abs(angle) < (45.00+ovl) ) { key_set(KEY_D,1);}
    }
 
 
    return;
}
 
#endif
 
 


You'll very likely have to remap some of the NAV controller entries from the default, this can be done in Controller Remapper in Input Translator - mine is like this

Image
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: KB + XIM + Titan2 - Fortnite Combos

Postby Silktouch » Tue Mar 20, 2018 9:00 pm

Hey MAL!
Its me again.

My actual problems is that everytime I switch to stairs and then instant to Wall or floor it switches to the harvesting tool.
Sure it is because the Titan thinks we are in harvesting/weapon mode and dont register quickly enough that we are already at slot 3 in building mode.

I think delay times wont fix this problem, maybe you know how we can fix this?
Maybe when we set the mode first and after this execute the building commands? I thought about this, when I wrote my question, I will try this out now, but maybe you know something better.

Cheers
Silk

Edit: Wow, I think what I wrote up there is the FIX! Works perfect now, maybe you want to Update your script. I will try it all night and report afer. I just put the tracking and mode up for them to execute before the delays and building things.

Code: Select all
combo BuildWall {
    bldslottrack = 1;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}
 
combo BuildFloor {
     bldslottrack = 2;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}
 
combo BuildStair {
    bldslottrack = 3;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}
User avatar
Silktouch
Sergeant Major
Sergeant Major
 
Posts: 70
Joined: Sat Mar 03, 2018 2:57 pm

Re: KB + XIM + Titan2 - Fortnite Combos

Postby NesQuik » Wed Mar 21, 2018 2:37 am

Could anyone translate the latest script for mouse and kb from the xbox to ps4 pls. I dont want to mess things up, im new to titan.
User avatar
NesQuik
Sergeant First Class
Sergeant First Class
 
Posts: 16
Joined: Tue Mar 20, 2018 6:07 am

Re: KB + XIM + Titan2 - Fortnite Combos

Postby MAL8010 » Wed Mar 21, 2018 7:26 am

Silktouch wrote:Hey MAL!
Its me again.

My actual problems is that everytime I switch to stairs and then instant to Wall or floor it switches to the harvesting tool.
Sure it is because the Titan thinks we are in harvesting/weapon mode and dont register quickly enough that we are already at slot 3 in building mode.

I think delay times wont fix this problem, maybe you know how we can fix this?
Maybe when we set the mode first and after this execute the building commands? I thought about this, when I wrote my question, I will try this out now, but maybe you know something better.

Cheers
Silk

Edit: Wow, I think what I wrote up there is the FIX! Works perfect now, maybe you want to Update your script. I will try it all night and report afer. I just put the tracking and mode up for them to execute before the delays and building things.

Code: Select all
combo BuildWall {
    bldslottrack = 1;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}
 
combo BuildFloor {
     bldslottrack = 2;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}
 
combo BuildStair {
    bldslottrack = 3;
    mode = 1;
    wait(InitailEnd_Wait);
    key_set(KEY_F, 1);
    wait(SameButton_Wait);
    key_set(KEY_F, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(GenericBetweenButton_Wait);
    key_set(KEY_E, 1);
    wait(SameButton_Wait);
    key_set(KEY_E, 0);
    wait(BeforeFireButton_Wait1);
    wait(BeforeFireButton_Wait2);
    mouse_set(MBUTTON_1, 1);
    wait(SameButton_Wait);
    mouse_set(MBUTTON_1, 0);
    wait(InitailEnd_Wait);
}


If it's going to pickaxe then you're executing the 2nd button before the first has finished and the script is still thus in combat mode. I've never encountered this before, you must have some very quick button presses!
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

Re: KB + XIM + Titan2 - Fortnite Combos

Postby MAL8010 » Wed Mar 21, 2018 7:26 am

NesQuik wrote:Could anyone translate the latest script for mouse and kb from the xbox to ps4 pls. I dont want to mess things up, im new to titan.


The scripts above will work as is on PS4, XB1 etc
User avatar
MAL8010
Sergeant Major of the Army
Sergeant Major of the Army
 
Posts: 263
Joined: Sun Feb 05, 2017 3:12 pm

PreviousNext

Return to GPC2 Script Programming

Who is online

Users browsing this forum: kubawaz and 110 guests