Could someone help me figure out how I am going to get my sprite to follow my mouse, It is not working to good the way I have made it and I cannot find any command to move a sprite that is simple like in dark basic.
Function MoveVehicle()
if GetRawMouseLeftState() = 1
X# = GetRawMouseX()
Y# = GetRawMouseY()
SpX# = GetSpriteX(RED_VEHICLE)
SpY# = GetSpriteY(RED_VEHICLE)
angle# = ATanFull(x# - GetSpriteXByOffset(RED_VEHICLE), y# - GetSpriteYByOffset(RED_VEHICLE))
SetSpriteAngle(RED_VEHICLE, angle#)
if X# <= SpX# and Y# <= SpY#
SetSpriteX ( RED_VEHICLE,SpX# - 4 )
SetSpriteY ( RED_VEHICLE,SpY# - 4 )
Endif
if X# <= SpX# and Y# >= SpY#
SetSpriteX ( RED_VEHICLE,SpX# - 4 )
SetSpriteY ( RED_VEHICLE,SpY# + 4 )
Endif
if X# >= SpX# and Y# <= SpY#
SetSpriteX ( RED_VEHICLE,SpX# + 4 )
SetSpriteY ( RED_VEHICLE,SpY# - 4 )
Endif
if X# >= SpX# and Y# >= SpY#
SetSpriteX ( RED_VEHICLE,SpX# + 4 )
SetSpriteY ( RED_VEHICLE,SpY# + 4 )
Endif
endif
EndFunction