Roblox Turning, camera turning/rotating.

Ask gaming related questions (AHK v1.1 and older)
Seth_Nooby1
Posts: 4
Joined: 14 Mar 2024, 09:23

Roblox Turning, camera turning/rotating.

Post by Seth_Nooby1 » 14 Mar 2024, 22:15

So basically in Roblox, there are a couple ways to turn or rotate. You either hold down right mouse button and move the mouse to rotate or press shift to activate shiftlock and move the mouse to rotate.
But either way still make the cursor in the same position so when writing a code you can't use a screen position to assign movement.
I never wrote a script or AHK script before but I did some research and found out that I have to use DllCall but it was so hard to understand.
Any other way to fix this problem or explaination of using DllCall in simple way would be a pleasure for me.
Thank you in advance.
Banaanae
Posts: 34
Joined: 19 Feb 2024, 04:08
Contact:

Re: Roblox Turning, camera turning/rotating.

Post by Banaanae » 15 Mar 2024, 02:57

What exactly are you trying to do?
I get you want to move the camera but to achieve what?
You're also posting in the (deprecated) AHK v1 forum, you may want to use AHK v2
Seth_Nooby1
Posts: 4
Joined: 14 Mar 2024, 09:23

Re: Roblox Turning, camera turning/rotating.

Post by Seth_Nooby1 » 15 Mar 2024, 08:18

Banaanae wrote:
15 Mar 2024, 02:57
What exactly are you trying to do?
I get you want to move the camera but to achieve what?
You're also posting in the (deprecated) AHK v1 forum, you may want to use AHK v2
In my current first project I just want to turn around but I also want to understand how it works for future use.
I'm also using v1
Banaanae
Posts: 34
Joined: 19 Feb 2024, 04:08
Contact:

Re: Roblox Turning, camera turning/rotating.

Post by Banaanae » 17 Mar 2024, 03:34

Code: Select all

speed := 10

up:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", -speed)
down:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", speed)
left:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -speed, "Int", 0)
right:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", speed, "Int", 0)
This script moves the mouse 10px in the direction of the arrow key
Change speed to change how far the camera is moved.

The first Int is x and the second Int is y (relative)
Post Reply

Return to “Gaming Help (v1)”