@Bodhran, the cursor looks to be following the mouse just fine. Perhaps you're not explaining exactly what you're looking to achieve.
As for keeping the cursor inside the screen, you should use the clamp function when setting its position. Something like:
- Code: Select all
Set Cursor X to clamp(mouse.X, scrollx - (ScreenWidth / 2), scrollx + (ScreenWidth / 2))
Set Cursor Y to clamp(mouse.Y, scrolly - (ScreenHeight / 2), scrolly + (ScreenHeight / 2))
Note that ScreenWidth/ScreenHeight aren't expressions. Rather, they represent the window size of your game, which you can find in the game properties panel.