We will see how to drag to the X axis your Layout / Game Screen with your mouse.
Step 1 - Create Variables
DragOn Number = 0 It will determine if we are trying to drag the screen
ClickPosition Number = 0 Where we start to drag
TraveledPosition Number = 0 The distance traveled from the first click to the actual position
Step 2 - Events
Mouse On Left Button Clicked
--- System Set Value ClickPosition to Mouse.X
Mouse Left Button is Down
--- System Set Value DragOn to Mouse.X
Mouse Left Button is Down
System DragOn = 1
System Every TIck
--- System Set TraveledPosition to ClickPosition - Mouse.X
--- System Set Scroll X to scrollx+TraveledPosition
Here we calculate where we need to go from the traveled distance. So in short, we can click wherever, we will just drag the screen, like on smartphone
Mouse On Left Button released
--- System set DragOn to 0
And thats all!
You can change Mouse from Touch to make it works on Smartphone... That is that easy, yes !
And if you want to add Y movement, you just need to copy and paste Variable and change X into Y...
Thank you for reading, waiting for your comments !
Cheers !