Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Help me with my no recoil script.


  • Please log in to reply
2 replies to this topic
hiko
  • Members
  • 13 posts
  • Last active: Aug 06 2016 12:51 PM
  • Joined: 01 Sep 2014
Hello Guys I hope you can help me!!!!
 
 
I want to edit this "norecoil" script down bellow:
 
 
 
 
#NoEnv
 
 
SendMode Input
 
 
SetWorkingDir %A_ScriptDir%
 
; iloveesl
 
NRA := 1
 
 
; SS
§::Suspend
  
; NR
  
~LButton::
 
Sleep 30 
while GetKeyState("LButton") & NRA
 
 
{
 
 
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
  
Sleep, 25
  
DllCall("mouse_event", uint, 1, int, 0, int, 4, uint, 0, int, 0)
  
Sleep, 10
 
}
 
return 
 
; Nades
 
 
~MButton::
 
if GetKeyState("LButton")
  
{
  
NRA := 0
 
Sleep, 1000
 
MouseClick, Left,,,,, U
 
NRA := 1
}
 
return
 
Insert::ExitApp
 
 
 
 
 
But this one is just moving the mousedown and stops at the location when you let the LButton go, but I want the mouse instead to jumpback to the center after I let the LButton go.
 
 
So when I hold LButton down it goes down like the script does but after I let it go I want the mouse to jumpback at the center point.


Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

Games are tricky. You could try to use MouseGetPos before the no-recoil takes effect, and then when you release your LButton use MouseMove to move back to that spot? Though when I used MouseMove in a full screen shooter, it didn't work so well. It was very jumpy.



hiko
  • Members
  • 13 posts
  • Last active: Aug 06 2016 12:51 PM
  • Joined: 01 Sep 2014

Ye I would have to put in the mousemove to 0pos so it is on the center again.. But I dont know the commands... :/ So if anybody could help me write the commands would be thankful...