Xim4 + T2 recoil issue?
Moderator: antithesis
49 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Re: Xim4 + T2 recoil issue?
Can anyone help me with this? I’ve tested multiple times with the same result , just need some modifications
-
johnsmith1999 - Sergeant Major
- Posts: 95
- Joined: Thu Aug 31, 2017 3:38 am
Re: Xim4 + T2 recoil issue?
I'll have a look when I'm back home in a few days.
-
antithesis - Colonel
- Posts: 1912
- Joined: Sat May 28, 2016 10:45 pm
Re: Xim4 + T2 recoil issue?
This is great stuff! Quick question how does the chicken dance work? I am using XIM4 with t2, would it be auto enabled?
Again thank you for all your hard work its greatly appreciated!
Again thank you for all your hard work its greatly appreciated!
-
Diagnosis - Sergeant First Class
- Posts: 20
- Joined: Wed Aug 23, 2017 8:05 am
Re: Xim4 + T2 recoil issue?
antithesis wrote:I'll have a look when I'm back home in a few days.
Thanks so much! Any luck with this?
-
johnsmith1999 - Sergeant Major
- Posts: 95
- Joined: Thu Aug 31, 2017 3:38 am
Re: Xim4 + T2 recoil issue?
Not yet, I'll see how the weekend pans out (4 kids to wrangle and a games expo to attend).
-
antithesis - Colonel
- Posts: 1912
- Joined: Sat May 28, 2016 10:45 pm
Re: Xim4 + T2 recoil issue?
Man yeah I get it totally! lol .. 4 myself as well... Thanks so much for your help and time antithesis!!
-
johnsmith1999 - Sergeant Major
- Posts: 95
- Joined: Thu Aug 31, 2017 3:38 am
Re: Xim4 + T2 recoil issue?
Any luck?
-
johnsmith1999 - Sergeant Major
- Posts: 95
- Joined: Thu Aug 31, 2017 3:38 am
Re: Xim4 + T2 recoil issue?
Sorry mate, I've been buried with other real life stuff. I'll get to it this weekend!
-
antithesis - Colonel
- Posts: 1912
- Joined: Sat May 28, 2016 10:45 pm
Re: Xim4 + T2 recoil issue?
No worries Bro, thanks so much !!
-
johnsmith1999 - Sergeant Major
- Posts: 95
- Joined: Thu Aug 31, 2017 3:38 am
Re: Xim4 + T2 recoil issue?
Try this, untested so no idea if it works -
I pulled J2K's roll and replaced it with the old one. I don't know how barrel is supposed to initiate as the doubleclick stuff doesn't translate to T2. I think it's set to trigger if the stick is held either left or right and circle is pressed and released within 150ms. As I said, I'm not sure how that's supposed to behave, it can be altered.
If the chickendance is messing with anti-recoil, just use the toggle in the script to disable chickendance for testing.
- Code: Select all
#pragma METAINFO("Battlefront-updated", 1, 0, "antithesis")
//------------------------------------------------------------------------------
// STAR WARS BATTLEFRONT
//------------------------------------------------------------------------------
#define LOOK_LEFT_TIME 250
#define ROLL_TIME 250
bool rapid_onoff = TRUE; // hold R2 and tap D-PAD UP to enable / disable Rapid-fire
fix32 RECOIL_V = 30.0;
fix32 RECOIL_H = 0.0;
fix32 RY;
fix32 RX;
bool ChickenDanceON; // hold L2 and tap D-PAD UP to enable / disable Chicken Dance
uint16 Barrel_Limit = 1500;
//------------------------------------------------------------------------------
//INITIALIZATION - init
init {
ColorLED('G',100);
}
//------------------------------------------------------------------------------
//MAIN ROUTINES
main {
//--------- ANTI-RECOIL --------------------------------------------------------
if (get_val (BUTTON_5)) // SHOOT
// to use Anti-recoil only when aiming down sights (recommended) delete the line above and delete // from the line below
// if (get_val (BUTTON_5) && get_val (BUTTON_8))
{
AntiRecoil(STICK_1_Y,RECOIL_V);
AntiRecoil(STICK_1_X,RECOIL_H);
}
//--------- RAPIDFIRE ----------------------------------------------------------
// hold R2 and tap D-PAD UP to toggle rapid-fire
if (get_val (BUTTON_5) && event_active (BUTTON_10))
{ rapid_onoff=!rapid_onoff;
if (rapid_onoff) {
ColorLED('B',100); // blue, for rapid fire only
} else if (!rapid_onoff) {
ColorLED('A',100); // yellow, for auto recoil only
} else {
ColorLED('G',100); // green, for all on
}
}
// Run Rapid Fire
if(rapid_onoff)
{
if(get_val(BUTTON_5)) {
set_val(BUTTON_9,0); // L3, stop running if you are doing so
combo_run(RAPID_FIRE); }
}
// Run Rapid Fire
if(rapid_onoff)
{
if(get_val(BUTTON_5)) {
set_val(BUTTON_9,0); // L3, stop running if you are doing so
combo_run(RAPID_FIRE); }
}
//--------- CHICKEN DANCE ------------------------------------------------------
// hold L2 and tap D-PAD UP to toggle Chicken Dance
if (get_val (BUTTON_8) && event_active (BUTTON_10))
{ ChickenDanceON=!ChickenDanceON; }
// Run Chicken Dance
if(ChickenDanceON)
{
if(get_val(BUTTON_5)) {
combo_run (ChickenDance);
}
}
//--------- BARREL ROLL ------------------------------------------------------------------
//Barrel Roll if left or right on the thumbstick and roll button is pressed
if((get_actual(STICK_2_X) > 70.0) && event_active(BUTTON_15) && time_release(BUTTON_15) < 150) { // when Y axis is > 92 is when it should normally trigger
combo_run (HOLD_RIGHT); combo_run(ROLL); combo_run(JUMP);
set_val(BUTTON_15,0);
inhibit(STICK_2_X, 500);
}
if((get_actual(STICK_2_X) < -70.0) && event_active(BUTTON_15) && time_release(BUTTON_15) < 150) {
combo_run(HOLD_LEFT); combo_run(ROLL); combo_run(JUMP);
set_val(BUTTON_15,0);
inhibit(STICK_2_X, 500);
}
} // main
//-------------------------------------------------------------------------------------------
//COMBOS
combo RAPID_FIRE {
set_val(BUTTON_5, 100); // SHOOT
wait(50); //45 for EE-4 apparently but I run 65
set_val(BUTTON_5,0);
wait(40); //15 for EE-4 apparently but I run 38/40-50 consistently
set_val(BUTTON_5,0);
set_val(BUTTON_5,0);
}
combo HOLD_RIGHT {
if(get_actual(STICK_2_Y) > 0.0) { // It can't be much higher than that in a circle with an X value of 90 which is when the roll should be possible
set_val(STICK_2_Y, 0);
inhibit(STICK_2_Y, 500);
}
if(get_actual(STICK_2_Y) < -0.0) { //Similarly can't be that much lower
set_val(STICK_2_Y, -0);
inhibit(STICK_2_Y, 500);
}
set_val(STICK_2_X, 100);
wait(250);
}
combo HOLD_LEFT {
if(get_actual(STICK_2_Y) > 0.0) { // It can't be much higher than that in a circle with an X value of 90 which is when the roll should be possible
set_val(STICK_2_Y, 0);
inhibit(STICK_2_Y, 500);
}
if(get_actual(STICK_2_Y) < -0.0) { //Similarly can't be that much lower
set_val(STICK_2_Y, -0);
inhibit(STICK_2_Y, 500);
}
set_val(STICK_2_X, -100);
wait(250);
}
combo ROLL {
wait(30);
set_val(BUTTON_15, 100);
wait(60);
set_val(BUTTON_15, 0);
wait(60);
set_val(BUTTON_15, 100);
wait(60);
set_val(BUTTON_15, 0);
wait(200);
}
combo JUMP {
wait(680); // 650 and 680 works on everything but Turning Point
set_val(BUTTON_16, 100); // CROSS
wait(40);
set_val(BUTTON_16, 0);
wait(60);
set_val(BUTTON_16, 100);
wait(40);
set_val(BUTTON_16, 0);
wait(200);
}
combo ChickenDance {
set_val(STICK_2_X, 100);
wait(300);
set_val(STICK_2_X, 0);
wait(100);
set_val(STICK_2_X, -100);
wait(300);
set_val(STICK_2_X, 0);
wait(100);
}
//==============================================================================
// FUNCTIONS
//------------------------------------------------------------------------------
// ANTI-RECOIL
void AntiRecoil (uint8 axis, fix32 recoil)
{
RY = get_actual(STICK_1_Y);
RX = get_actual(STICK_1_X);
if (get_val(BUTTON_5) && (sqrt(RX*RX + RY*RY)) <= abs(recoil))
{
if(abs(RY) <= abs(recoil))
{
set_val(axis,(recoil * (100.0 - abs(get_val(axis)))) / 100.0 + get_val(axis));
}
}
}
//------------------------------------------------------------------------------
// LED LIGHTS
// LED Color 'C'olor , n brightness , n blink
void ColorLED(char Color, int bri) {
int Color1, Color2, Color3, Color4;
if(Color == 'B'){Color1 = bri; Color2 = 0; Color3 = 0; Color4 = 0;}
if(Color == 'R'){Color1 = 0; Color2 = bri; Color3 = 0; Color4 = 0;}
if(Color == 'G'){Color1 = 0; Color2 = 0; Color3 = bri; Color4 = 0;}
if(Color == 'P'){Color1 = 0; Color2 = 0; Color3 = 0; Color4 = bri;}
if(Color == 'C'){Color1 = bri; Color2 = 0; Color3 = bri; Color4 = 0;}
if(Color == 'A'){Color1 = 0; Color2 = bri; Color3 = bri; Color4 = 0;}
if(Color == 'W'){Color1 = bri; Color2 = bri; Color3 = bri; Color4 = bri;}
led_reset();
led_set(LED_1, (fix32)Color1, bri); led_set(LED_2, (fix32)Color2, bri);
led_set(LED_3, (fix32)Color3, bri); led_set(LED_4, (fix32)Color4, bri);
return;
}
I pulled J2K's roll and replaced it with the old one. I don't know how barrel is supposed to initiate as the doubleclick stuff doesn't translate to T2. I think it's set to trigger if the stick is held either left or right and circle is pressed and released within 150ms. As I said, I'm not sure how that's supposed to behave, it can be altered.
If the chickendance is messing with anti-recoil, just use the toggle in the script to disable chickendance for testing.
-
antithesis - Colonel
- Posts: 1912
- Joined: Sat May 28, 2016 10:45 pm
49 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Return to XIM Apex, XIM4, XIM Edge with Titan devices
Who is online
Users browsing this forum: No registered users and 26 guests