hey,
so i am trying to write a script that turns my char around when i press a button. its for an 3d mmo with 1st / 3rd person view.
anyways, this is what i got so far:
Code:
hotkeyset("a", "test")
$turn=1
while 1
$mousex = MouseGetPos(0)
ToolTip($mousex, 600, 0)
wend
func test()
$mousex = MouseGetPos(0)
mousemove($mousex+13,@desktopheight/2,0)
endfunc
1st problem: after a while, the script will stop turning.
the tooltip from my script shows the x-coordinates of my mouse. if i turn around manually, after a while they wont increase or decrease. if i turn around to the right, the x coordinates will not increase above 1919 and will not go below 960 if i turn to the left. whenever i use the script to turn, it will stop turning once the 1919 x coordinate is reached. after that i can however use the mouse to turn further to the right, however the x coordinate will not increase.
2nd problem: the first time i press the hotkey, nothing happens. after that each press will turn the character (untill the above mentioned 1919 coordinate is reached). however if i turn a few times using the hotkey, then move around manually and then press the button again, it will either not turn at all, or turn only a small bit. i need to press the hotkey again, and then it will turn normally again untill either the x coordinate is reached or untill i move manually (the first press of the hotkey after moving manually will again result in either no turn or only a small turn).
i hope i made myself clear.
does anyone have any advice on how to get this to work properly?
thanks