How to account for horizontal recoil?
Hey Sbuj, I have poked around the internals of this and it is working really nicely so far. Editing the recoil_table for each weapon is fairly intuitive.
Now the question is, how can I customize the horizontal recoil? I THINK the function MoveMouseRelative(0, recovery / 10) part is where it feeds in the mouse movements in X and Y planes. Now, the Y value reads off recovery / 10, but the X value (horizontal recoil) currently stays set at 0. Is it possible for you to add an input from another set of recoil tables to feed into the horizontal movement value, so that we can tinker with the horizontal recoil?
Cant wait to tinker with this more.
Is it possible to activate a gun recoil script with a non-logitech keyboard? Like I have a logitech mouse but I only have three extra mouse keys and I want to be able to activate more in a game.
I dl this script, i pu it in J:\lua\scriptwz.lua
I load G HUB
Modern warfar
modify scipit
activ
inport
i put this line at the 1st line
data = dofile [[j:\lua\scriptwz.lua]]
but after i dont want to know for start the script
I modify the script Keyboard key bind
local m4a1_gkey = 1
Its good ?
I don't know if it's because of my resolution but the recoil compensation for me is really little or maybe it's because I play with low dpi+sens?
how can I change the x axis
how can I change the x axis? please
This doesn't work and the instructions are pretty unclear.
"drive somewhere out of your desktop make sure u empty out the script that is in the script editor!"
What? Make sure you empty out what exactly...?
11. Edit the script again and type this :
... Change D: with whatever and luaname as the name you have it on, if it doesnt work on launch and u dont see ur mouse going down just put the actual location of the script
Again, what? This doesn't make sense. Put the actual location of the script..? I followed these instructions as they were and it just doesn't work, period. I use a newer Logitech keyboard with 5 programmable G keys.
Hi,
Can you do something with corsair keyboard + mouse ?
Thanks
One question, why does it only work for me in the first 10-15 rounds approximately? then the recoil is still normal ... how do I modify this?
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...

Originally Posted by
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...
- - - Updated - - -

Originally Posted by
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...
- - - Updated - - -

Originally Posted by
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
i follow all the steps but it doesnt work for me...
- - - Updated - - -

Originally Posted by
fleshlightx
Got it to work but recoil needs tweaking as per OP.
Working on G502 with GHub. Should work with any logitech keyboard or mouse in GHub
Ill explain best I can.
1. Extract lua to another location other than desktop (note the location) mines is in Drive F (F:\recoil.lua)
2. Launch GHub > Click on Logitech mouse > Assignments > System
2a. In the list, you'll see the Gkeys and corresponding mouse action (Primary click = G1)
2b. If you don't see Gkeys, enable g-shift then disable, they should appear now
3. Open lua with a text editor (notepad, etc)
3a. Under "Mouse key binds" change "nil" to any of the Gkey from list above but dont include the G in lua text. On mines, I have MP7 set to 6 (6=G6)
3b. 1=G1, 2=G2, 3=G3, etc
3c. G502 has 11 Gkeys so you can only set up to 11 key binds for gun recoils. pick your fav guns. should look like this in lua text: local MP7_key = 6
3d. Note the "local set_off_key" this is to turn off the script. Recommend assigning to Gkey. Mines is set to 9 (9=G9)
3e. Save the lua script
4. Launch GHub > click on profile at the top below "active profile" > click on the script icon at the bottom > Create new script > Edit script
4a. Delete everything inside script box and type in the first line: data = dofile[[D:\Luaname.lua]]
4b. Change the "D:\Luaname.lua" to the location of your lua script.
4c. crtl+s to save
Should work now. You can tell it's working if you press the Gkey assigned to a gun the caps lock light will turn on, on your keyboard. Also, on the desktop, if you press and hold primary key, mouse pointer should move down.
If you assigned "local set_off_key" to a Gkey and press that key, the caps lock light will turn off.
it works ! but not run while im in the game... i this it s detected
works outside the game for me but not in the game. I have dual monitors so i can click inside the game, nothing happens, alt+tab out and go onto the desktop on the other monitor and i can see it drag down my mouse. Any thoughts? followed all directions.