How do i code mouse sensing?

I am close to making my game but I don't know how to do mouse sensing to scroll the background can someone help?

Like, detect scrolling the mouse, or moving the mouse across the screen?

like in fnaf when your mouse moves the x position of the office scrolls

I've never played that game, but I have an idea what you're saying.

I wrote a camera library before. Here you go:
Scrolling Camera

(I'll leave attaching it to the mouse using the sensing blocks as an exercise for the reader :-)‚Äč )

I would show you a gif but I cant do that

Share it!

look up FNAF 2 online start the game and move around your mouse then look at the office

Just change the code in the camera sprite.

Screen Shot 2024-02-19 at 10.32.08 AM

look at when your mouse is touching the outside of the edge, that's a problem.

you can get the min and max reporters by placing a ( ( ) + ( ) ) reporter, right clicking it and then selecting relabel...

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.