improving my 360 degree turning script Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
roadkill1233
Posts: 6
Joined: 23 Feb 2017, 10:07

improving my 360 degree turning script

20 Nov 2017, 03:13

Code: Select all

LOOP_TIMES := 1320
SPEED := 21
*f::
Loop, %LOOP_TIMES%
{
DllCall("mouse_event", uint, 1, int, SPEED, int, 0, uint, 0, int, 0)
}
return
this is a rather simple script i have researched and came up with, basically by pressing F, i would be able to turn 360 degrees without problem in game.
however , i want the script to instead sharply turn 180 degrees, and then followed by another sharp 180 degrees instead of doing a full-on fast 360 swing, how do i modify my script to do so?
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: improving my 360 degree turning script  Topic is solved

20 Nov 2017, 04:49

I would guess that you'd want to cut LOOP_TIMES in half, to 660. If you mean that you want a single press of F to do 180 degrees twice, then you'd need to duplicate the Loop section so that it runs twice, like so:

Code: Select all

LOOP_TIMES := 660
SPEED := 21
*f::
Loop, %LOOP_TIMES%
  DllCall("mouse_event", uint, 1, int, SPEED, int, 0, uint, 0, int, 0)
Loop, %LOOP_TIMES%
  DllCall("mouse_event", uint, 1, int, SPEED, int, 0, uint, 0, int, 0)
return
roadkill1233
Posts: 6
Joined: 23 Feb 2017, 10:07

Re: improving my 360 degree turning script

20 Nov 2017, 05:55

Osprey wrote:I would guess that you'd want to cut LOOP_TIMES in half, to 660. If you mean that you want a single press of F to do 180 degrees twice, then you'd need to duplicate the Loop section so that it runs twice, like so:

Code: Select all

LOOP_TIMES := 660
SPEED := 21
*f::
Loop, %LOOP_TIMES%
  DllCall("mouse_event", uint, 1, int, SPEED, int, 0, uint, 0, int, 0)
Loop, %LOOP_TIMES%
  DllCall("mouse_event", uint, 1, int, SPEED, int, 0, uint, 0, int, 0)
return
exactly what i asked for, i did not include the second <<loop,%loop_times%>> when i tried it myself

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, doodles333, Google [Bot] and 341 guests