need lagacy sticks

Gtuner Plugins support. MaxAim, MaxRemapper, Combo Magick, Game Rec.

Re: need lagacy sticks

Postby claw » Mon Sep 10, 2018 2:08 pm

xAUSTIN316x wrote:thanks i got it. it works but for some reson when i turn left or rite my character stops walking. it wont let me turn and walk at the same time but it is the legacy settings finally :ashamed:


I recently got a Titan Two just so I could have Legacy settings and I ran into the same problem of the character stopping their walk when turning. I think I fixed it though with just a few lines of code. I know this is a really old thread, but maybe it could still help you.

Put this in your main:

Code: Select all
if((abs(get_actual(STICK_2_Y)) > 50.0)){    
    if(get_actual(STICK_2_Y) < 0.0){
        set_val(STICK_2_Y, -100.0);
    } else {
        set_val(STICK_2_Y, 100.0);
    }
}
XBL Gamertag: CLAWESOME
User avatar
claw
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 05, 2018 9:14 am

Re: need lagacy sticks

Postby J2Kbr » Tue Sep 11, 2018 6:32 am

Thank you claw for your input here. Appreciated.
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: need lagacy sticks

Postby claw » Tue Sep 11, 2018 11:46 pm

You're welcome, hopefully it helps. I haven't had proper Legacy controls since Halo 2, every game since that I've played has either broken the scheme with the forward movement problem you were having(Gears of War, Master Chief Collection), or just not included it all together. When I get home later I can give you my full script for the Titan Two(don't know if it's Titan One compatible) which allows switching control schemes on the fly, because some games like PUBG it's really hard to drive and parachute with Legacy active.

edit: posted my script in the Titan Two forum here: https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10024
XBL Gamertag: CLAWESOME
User avatar
claw
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 05, 2018 9:14 am

Re: need lagacy sticks

Postby J2Kbr » Wed Sep 12, 2018 8:59 am

claw wrote:edit: posted my script in the Titan Two forum here: https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10024

:smile0517: :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: need lagacy sticks

Postby claw » Wed Sep 12, 2018 7:01 pm

J2Kbr wrote:
claw wrote:edit: posted my script in the Titan Two forum here: https://www.consoletuner.com/forum/viewtopic.php?f=26&t=10024

:smile0517: :smile0517:


I figured out a better way to compensate speed for character movement compensation(way simpler than I had thought, just calculating distance stick is from center point) but I have a question maybe you could answer J2Kbr. I'm using a square root function on every left stick input change, is that a costly calculation that could potentially lead to lag? Still new to this device and trying to learn it's limitations and seeing if calculating the movement precisely is worth it over a simple calculation that doesn't isn't computationally expensive and is hardly noticeably different. Thanks!

Code: Select all
 
fix32 forwardMovementCompensation(fix32 x, fix32 y){
    // Distance formula between two points, the sticks position and (0,0)
    fix32 speed = sqrt(sq(x) + sq(y));
    // If speed within 5 of full speed
    if((100.0 - speed) <= 5.0){
        speed = 100.0;
    }
    return speed;
}
XBL Gamertag: CLAWESOME
User avatar
claw
Sergeant
Sergeant
 
Posts: 7
Joined: Wed Sep 05, 2018 9:14 am

Re: need lagacy sticks

Postby J2Kbr » Thu Sep 13, 2018 9:41 am

claw wrote:but I have a question maybe you could answer J2Kbr. I'm using a square root function on every left stick input change, is that a costly calculation that could potentially lead to lag?

Trigonometric functions requires more processing than the other regular functions. However, you shouldn't notice any performance impact with the posted code. In any case, you can always check the CPU usage at Gtuner's Device Monitor while running the script. :smile0517:
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: need lagacy sticks

Postby crainbo » Tue Aug 10, 2021 9:39 pm

Can someone assist me in putting Claw's movement compensation into the basic Legacy stick code for Titan One? I try and paste in the main but not working for me. I am able to use the basic code for legacy sticks and it works, just need the movement in there now.
User avatar
crainbo
Private First Class
Private First Class
 
Posts: 2
Joined: Mon Aug 09, 2021 4:07 pm

Previous

Return to Gtuner Plugins Support

Who is online

Users browsing this forum: No registered users and 44 guests