Can this be run on t2 ?

Forum to discuss the usage, configuration and connection of XIM Apex, XIM4, XIM Edge, XIM3 with the Titan Two and Titan One devices. As well as dedicated Gamepacks, scripts, macros and combos for the XIM products.

Moderator: antithesis

Can this be run on t2 ?

Postby doiz » Sat Mar 16, 2019 7:53 pm

I need it working on t2


thank you in advance


This error comes
GPC error: TOP Anti-Recoil.gpc (32): Illegal operation '='.



Code: Select all
#include <titanone.gph> 
 
define XIM4_MIN_VAL = 20;
 
// The force needed is different when ADS or hip firing
define ANTIRECOIL_FORCE = 6.5;
 
int tmp, rsf, xcmp;
 
 
main {
        if(get_val(PS4_R2)) {
        // Rescale XIM4 aim Y axis
        if(get_val(PS4_RY) >= XIM4_MIN_VAL) {
            set_val(PS4_RY, get_val(PS4_RY)-XIM4_MIN_VAL);
            sensitivity(PS4_RY, NOT_USE, rsf);
        } else if(get_val(PS4_RY) <= -XIM4_MIN_VAL) {
            set_val(PS4_RY, get_val(PS4_RY)+XIM4_MIN_VAL);
            sensitivity(PS4_RY, NOT_USE, rsf);
        } else set_val(PS4_RY, 0);
 
        // Rescale XIM4 aim X axis
        if(get_val(PS4_RX) >= XIM4_MIN_VAL) {
            set_val(PS4_RX, get_val(PS4_RX)-XIM4_MIN_VAL);
            sensitivity(PS4_RX, NOT_USE, rsf);
        } else if(get_val(PS4_RX) <= -XIM4_MIN_VAL) {
            set_val(PS4_RX, get_val(PS4_RX)+XIM4_MIN_VAL);
            sensitivity(PS4_RX, NOT_USE, rsf);
        } else set_val(PS4_RX, 0);
 
        // X movements compensation
        tmp = ANTIRECOIL_FORCE - 3 * abs(get_val(PS4_RX));
 
        // Apply the anti-recoil
        if(tmp <= 0) tmp = 1;
        tmp = get_val(PS4_RY) + tmp;
        if(tmp > 100) tmp = 100;
        else if(tmp < -100) tmp = -100;
        set_val(PS4_RY, tmp);
 
        // Re-apply deadzone;
        deadzone(PS4_RX, PS4_RY, XIM4_MIN_VAL, XIM4_MIN_VAL);
    }
 
 
User avatar
doiz
Sergeant
Sergeant
 
Posts: 7
Joined: Sat May 05, 2018 5:21 am

Re: Can this be run on t2 ?

Postby bonefisher » Sun Mar 17, 2019 2:42 am

Code: Select all
 
#include <titanone.gph>
 
 
#define XIM4_MIN_VAL  20
 
// The force needed is different when ADS or hip firing
#define ANTIRECOIL_FORCE  6
 
int tmp, rsf, xcmp;
 
 
main {
        if(get_val(PS4_R2)) {
        // Rescale XIM4 aim Y axis
        if(get_val(PS4_RY) >= XIM4_MIN_VAL) {
            set_val(PS4_RY, get_val(PS4_RY)-XIM4_MIN_VAL);
            sensitivity(PS4_RY, NOT_USE, rsf);
        } else if(get_val(PS4_RY) <= -XIM4_MIN_VAL) {
            set_val(PS4_RY, get_val(PS4_RY)+XIM4_MIN_VAL);
            sensitivity(PS4_RY, NOT_USE, rsf);
        } else set_val(PS4_RY, 0);
 
        // Rescale XIM4 aim X axis
        if(get_val(PS4_RX) >= XIM4_MIN_VAL) {
            set_val(PS4_RX, get_val(PS4_RX)-XIM4_MIN_VAL);
            sensitivity(PS4_RX, NOT_USE, rsf);
        } else if(get_val(PS4_RX) <= -XIM4_MIN_VAL) {
            set_val(PS4_RX, get_val(PS4_RX)+XIM4_MIN_VAL);
            sensitivity(PS4_RX, NOT_USE, rsf);
        } else set_val(PS4_RX, 0);
 
        // X movements compensation
        tmp = ANTIRECOIL_FORCE - 3 * abs(get_val(PS4_RX));
 
        // Apply the anti-recoil
        if(tmp <= 0) tmp = 1;
        tmp = get_val(PS4_RY) + tmp;
        if(tmp > 100) tmp = 100;
        else if(tmp < -100) tmp = -100;
        set_val(PS4_RY, tmp);
 
        // Re-apply deadzone;
        deadzone(PS4_RX, PS4_RY, XIM4_MIN_VAL, XIM4_MIN_VAL);
    }
}   
 
bonefisher
Major General
Major General
 
Posts: 4888
Joined: Thu Jan 29, 2015 10:49 am


Return to XIM Apex, XIM4, XIM Edge, XIM3 with Titan devices

Who is online

Users browsing this forum: No registered users and 3 guests