ADS script with delay?
6 posts
• Page 1 of 1
ADS script with delay?
I already posted this in another topic, but instead of hijacking it I figured I'd open my own. Alright, so I'm currently using MaxAim to play CoD on the XB1 and I'm getting stuck on the ADS (Aiming Down Sights) portion of the configuration. Once you aim down sights your sensitivity slows down. This is because of how the game handles controllers, but us K/M people are not used to that. So I found a script to up the sensitivity while aiming down sights. It was set at 110% but that wasn't nearly enough. I found 135% to be the sweet spot. There is one major issue with it tho, the script activates the moment you right click. But the game slowing down your aim does not kick in until you're actually aiming down the sights. Result: moment you press zoom there is a 0.1-0.2 second time frame where your regular sensitivity is boosted to 135% causing a mouse jerk. The wait command does not work inside the "main" and/or "if" statement (why not btw? I wish it did). So right now I have no idea how to solve that. If there's any experts out here I'd be happy to hear it.
My current ADS script:
As you can see I tried to fix it by setting it to 100% first and then 135% but that didn't really seem to do the job. I don't know how fast these commands process, I guess I could try setting it to 100% like 50 times to cause a delay. Haven't tried that yet. I was wondering if we could do some sort of while loop, but I'd need to know if the script can somehow get back that the game finished zooming. Just brain storming here, any input is welcome!
My current ADS script:
- Code: Select all
define ZOOM = XB1_LT; // Change this to your console, usually looking for the Left trigger
define X_AXIS = XB1_RX; // Change this to your console
define Y_AXIS = XB1_RY; // Change this to your console
main {
if(get_val(ZOOM)) {
sensitivity( X_AXIS, 0, 100)
sensitivity( Y_AXIS, 0, 100)
sensitivity( X_AXIS, 0, 135)
sensitivity( Y_AXIS, 0, 135)
}
}
As you can see I tried to fix it by setting it to 100% first and then 135% but that didn't really seem to do the job. I don't know how fast these commands process, I guess I could try setting it to 100% like 50 times to cause a delay. Haven't tried that yet. I was wondering if we could do some sort of while loop, but I'd need to know if the script can somehow get back that the game finished zooming. Just brain storming here, any input is welcome!
-
Aqid - Sergeant
- Posts: 8
- Joined: Tue Nov 29, 2016 4:35 pm
Re: ADS script with delay?
You can use the function get_ptime to check for how long the button ZOOM has being pressed down.
http://www.consoletuner.com/kbase/i_o_f ... #get_ptime
For example, to apply the sensitivity modification only after 200ms the ZOOM has being pressed, you can do this:
http://www.consoletuner.com/kbase/i_o_f ... #get_ptime
For example, to apply the sensitivity modification only after 200ms the ZOOM has being pressed, you can do this:
- Code: Select all
define ZOOM = XB1_LT; // Change this to your console, usually looking for the Left trigger
define X_AXIS = XB1_RX; // Change this to your console
define Y_AXIS = XB1_RY; // Change this to your console
main {
if(get_val(ZOOM) && get_ptime(ZOOM) >= 200) {
sensitivity( X_AXIS, 0, 135);
sensitivity( Y_AXIS, 0, 135);
}
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: ADS script with delay?
That is genius! Thanks, I'm going to try that. I'll let you know how that works.
-
Aqid - Sergeant
- Posts: 8
- Joined: Tue Nov 29, 2016 4:35 pm
Re: ADS script with delay?
In order to make the switch more gradual, do you think the following code would work?
Also, if you specify sensitivity twice (or 4 times like here), is the second time you specify it the percentage of the base value or of the previous value? So, after 50ms it would be set to BASE x 110%, after 100ms would it be BASE x 120% or BASE x 110% x 120%?
- Code: Select all
define ZOOM = XB1_LT; // Change this to your console, usually looking for the Left trigger
define X_AXIS = XB1_RX; // Change this to your console
define Y_AXIS = XB1_RY; // Change this to your console
main {
if(get_val(ZOOM) && get_ptime(ZOOM) >= 50) {
sensitivity( X_AXIS, 0, 110);
sensitivity( Y_AXIS, 0, 110);
}
if(get_val(ZOOM) && get_ptime(ZOOM) >= 100) {
sensitivity( X_AXIS, 0, 120);
sensitivity( Y_AXIS, 0, 120);
}
if(get_val(ZOOM) && get_ptime(ZOOM) >= 150) {
sensitivity( X_AXIS, 0, 130);
sensitivity( Y_AXIS, 0, 130);
}
if(get_val(ZOOM) && get_ptime(ZOOM) >= 200) {
sensitivity( X_AXIS, 0, 135);
sensitivity( Y_AXIS, 0, 135);
}
}
Also, if you specify sensitivity twice (or 4 times like here), is the second time you specify it the percentage of the base value or of the previous value? So, after 50ms it would be set to BASE x 110%, after 100ms would it be BASE x 120% or BASE x 110% x 120%?
-
Aqid - Sergeant
- Posts: 8
- Joined: Tue Nov 29, 2016 4:35 pm
Re: ADS script with delay?
That resulted in a lot of weirdness. The final script is perfect, it exactly skips that point and there is no mouse jerk.
- Code: Select all
define ZOOM = XB1_LT; // Change this to your console, usually looking for the Left trigger
define X_AXIS = XB1_RX; // Change this to your console
define Y_AXIS = XB1_RY; // Change this to your console
main {
if(get_val(ZOOM)) {
sensitivity( X_AXIS, 50, 100)
sensitivity( Y_AXIS, 50, 100)
if(get_ptime(ZOOM) >= 100) {
sensitivity( X_AXIS, 55, 150)
sensitivity( Y_AXIS, 55, 150)
}
}
}
-
Aqid - Sergeant
- Posts: 8
- Joined: Tue Nov 29, 2016 4:35 pm
6 posts
• Page 1 of 1
Return to Gtuner Plugins Support
Who is online
Users browsing this forum: No registered users and 84 guests