I appreciate the help, I've been digging around for a while and found a similar piece of code to the one you linked, I've tried both and can't quite get it to work for me.
Here's what I got so far.
f3::
txx = -9.365444 ;static target x coordinate
tyy = 581.791077 ;static target y coordinate
tx:=toFloat(toHex(readMemory("0x9377A478",,pid))) ;read my x coord
ty:=toFloat(toHex(readMemory("0x9377A474",,pid))) ;read my y coord
X:=txx-tx
Y:=tyy-ty
dist:= sqrt((X*X) + (Y*Y)) ;distance
angle:= Atan2(X,Y) * (180 / Pi)
adjust:=-45 ;adjust because game has a view that's 45 degrees slanted
if angle < 0
angle := 360 + angle
angle += adjust
if angle > 360
angle -= 360
sleep 1000
newX := BaseX + dist * cos(angle)
newY := BaseY + dist * sin(angle)
;newX := BaseX + 100 * sin(degree2rad(angle)) ;previus code similar results
;newY := BaseY + 100 * cos(degree2rad(angle))
MouseMove, %newX%, %newY%
return
I forgot to mention the mouse base, it's located at the center of a windowed game x800 y400.
I've also tried both coordmodes, screen and relative. makes a small difference but nothing else.
I've done debugging and my distance and degrees are spot on always returning exactly where they should,, perhaps I'm not doing the other math right, if so let me know please, I can't really understand this math like I'd want to but I am trying.