Anti Recoil Script
20 posts
• Page 1 of 2 • 1, 2
Anti Recoil Script
I want to use an anti recoil script with my mouse and keyboard setup with the titan 2. However when I put it on and start to shoot it pulls the gun down extremely fast and just aims at the ground. Is there a fix for something like this or is it impossible because of the sensor on the mouse?
-
Timmyk22 - First Sergeant
- Posts: 48
- Joined: Wed Sep 20, 2017 1:31 pm
Re: Anti Recoil Script
What script are you using? Sounds like you need to adjust settings in the anti-recoil.
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Anti Recoil Script
I'm just going to assume you were using an anti recoil script that was made for the attended use of a controller, is this Correct?
Also,
What game or games are you playing / want anti-recoil for ?,
Setting up anti-recoil for use with the mouse is fairly simple, but first I need to know how is the mouse connected to the T2.
Directly with the T2?
Or through a Xim Device?
Also,
What game or games are you playing / want anti-recoil for ?,
Setting up anti-recoil for use with the mouse is fairly simple, but first I need to know how is the mouse connected to the T2.
Directly with the T2?
Or through a Xim Device?
-
Sillyasskid - Captain
- Posts: 574
- Joined: Sat May 14, 2016 3:07 am
Re: Anti Recoil Script
it is connected directly, running 12,000 dpi. I do believe it was for a controller also. Not sure how to write one for a mouse connected to a titan 2. The games I play are call of duty and rainbow six siege, so i guess id be looking for more of a universal script.
-
Timmyk22 - First Sergeant
- Posts: 48
- Joined: Wed Sep 20, 2017 1:31 pm
Re: Anti Recoil Script
- Code: Select all
#define vertical 20.00 //adjust anti-recoil: add if gun is rising and subtract if dropping.
#define horizontal 0.00 //adjust anti-recoil right and left: add positive number if going left
//and add a - in front of number if going right.
bool rapid_fire_toggle;
bool anti_recoil_toggle;
fix32 noise;
init{noise = 7.0;}
main {
//-------------------------Remove stick noise---------------------------------//
if(abs(get_actual(STICK_1_X)) < noise) set_val(STICK_1_X, 0.0);
if(abs(get_actual(STICK_1_Y)) < noise) set_val(STICK_1_Y, 0.0);
if(abs(get_actual(STICK_2_X)) < noise) set_val(STICK_2_X, 0.0);
if(abs(get_actual(STICK_2_Y)) < noise) set_val(STICK_2_Y, 0.0);
//-------------------------Anti-recoil toggle---------------------------------//
/* To turn anti-recoil on/off hold ADS trigger and click d-pad down */
if(get_actual(BUTTON_8)){
set_val(BUTTON_11, 0.0);
if(event_active(BUTTON_11)) {
anti_recoil_toggle = (anti_recoil_toggle == 0?1:0);}}
//----------------------------------------------------------------------------//
if(anti_recoil_toggle){
if(get_actual(BUTTON_5))combo_run(anti_recoil);
if(is_active(STICK_1_Y))combo_stop(anti_recoil);
if(is_active(STICK_1_X))combo_stop(anti_recoil);}
//-------------------------Rapid fire toggle----------------------------------//
/* To turn rapid fire on/off hold ADS trigger and click d-pad up */
if(get_actual(BUTTON_8)){
set_val(BUTTON_10, 0.0);
if(event_active(BUTTON_10)) {
rapid_fire_toggle = (rapid_fire_toggle == 0?1:0);}}
//----------------------------------------------------------------------------//
if(rapid_fire_toggle && get_actual(BUTTON_5))combo_run(rapid_fire);
}
combo rapid_fire
{
set_val(BUTTON_5, 100.0);
wait(60);
set_val(BUTTON_5, 0.0);
wait(60);
set_val(BUTTON_5, 0.0);
}
combo anti_recoil
{
set_val(STICK_1_Y, vertical);
set_val(STICK_1_X, horizontal);
}
Use a input translator for the game your playing and add to slot with this. Adjust the anti-recoil at top of script. Turning on/off anti-recoil hold ads trigger then click d-pad down and for rapid fire hold ads trigger and click d-pad up. This is used for anything......
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Anti Recoil Script
Timmyk22 wrote:it is connected directly, running 12,000 dpi. I do believe it was for a controller also. Not sure how to write one for a mouse connected to a titan 2. The games I play are call of duty and rainbow six siege, so i guess id be looking for more of a universal script.
In case of using the mouse direct connected to the Titan Two the GPC script language has a handy function that is perfect for anti-recoil with mouse: mxyconverter_voffset()
Here is an example on how to use this function:
- Code: Select all
main {
if(event_active(BUTTON_5)) {
mxyconverter_voffset(29); // ANTI-RECOIL
} else if(event_release(BUTTON_5)) {
mxyconverter_voffset(0);
}
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Anti Recoil Script
- Code: Select all
#include <mouse.gph>
#define vertical_compensation 24 //pull force
init {
const uint8 mmap[] = {
MOUSE_X, STICK_1_X,
MOUSE_Y, STICK_1_Y,
MWHEEL_FORWARD, BUTTON_17,
MWHEEL_BACKWARD, BUTTON_6,
MBUTTON_1, BUTTON_5,
MBUTTON_2, BUTTON_8,
MBUTTON_3, BUTTON_14,
MBUTTON_4, BUTTON_15,
MBUTTON_5, BUTTON_16,
}; mousemapping(mmap);
}
main {
if(event_active(BUTTON_5)) {
mxyconverter_voffset(vertical_compensation);
} else if(event_release(BUTTON_5)) {
mxyconverter_voffset(0);
}
if(is_active(STICK_1_Y)){mxyconverter_voffset(0);
}else if(is_release(STICK_1_Y) && is_active(BUTTON_5)){
mxyconverter_voffset(vertical_compensation);
}
if(is_active(STICK_1_X)){mxyconverter_voffset(0);
}else if(is_release(STICK_1_X) && is_active(BUTTON_5)){
mxyconverter_voffset(vertical_compensation);
}
}
Here the fix J2Kbr on that recoil! If your going slow and the way you have it is fine but when turn fast using it gets a downward curve to it so this fix puts it precise on!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
Re: Anti Recoil Script
Awesome! I'll give it a try sometime today, thanks.
-
Timmyk22 - First Sergeant
- Posts: 48
- Joined: Wed Sep 20, 2017 1:31 pm
Re: Anti Recoil Script
bonefisher wrote:
- Code: Select all
#include <mouse.gph>
#define vertical_compensation 24 //pull force
init {
const uint8 mmap[] = {
MOUSE_X, STICK_1_X,
MOUSE_Y, STICK_1_Y,
MWHEEL_FORWARD, BUTTON_17,
MWHEEL_BACKWARD, BUTTON_6,
MBUTTON_1, BUTTON_5,
MBUTTON_2, BUTTON_8,
MBUTTON_3, BUTTON_14,
MBUTTON_4, BUTTON_15,
MBUTTON_5, BUTTON_16,
}; mousemapping(mmap);
}
main {
if(event_active(BUTTON_5)) {
mxyconverter_voffset(vertical_compensation);
} else if(event_release(BUTTON_5)) {
mxyconverter_voffset(0);
}
if(is_active(STICK_1_Y)){mxyconverter_voffset(0);
}else if(is_release(STICK_1_Y) && is_active(BUTTON_5)){
mxyconverter_voffset(vertical_compensation);
}
if(is_active(STICK_1_X)){mxyconverter_voffset(0);
}else if(is_release(STICK_1_X) && is_active(BUTTON_5)){
mxyconverter_voffset(vertical_compensation);
}
}
Here the fix J2Kbr on that recoil! If your going slow and the way you have it is fine but when turn fast using it gets a downward curve to it so this fix puts it precise on!
Can this work for controller?
-
itsPANDA - Sergeant
- Posts: 6
- Joined: Wed Sep 25, 2019 3:57 am
Re: Anti Recoil Script
No only for mouse!
- bonefisher
- Lieutenant General
- Posts: 5413
- Joined: Thu Jan 29, 2015 10:49 am
20 posts
• Page 1 of 2 • 1, 2
Return to GPC2 Script Programming
Who is online
Users browsing this forum: midg3t2 and 115 guests