Does anyone know how to scrolling where the mouse is in the center of the screen and the screen moves along with the mouse movements?
Seems like it should be easy but it isn't mainly because the mouse scrolls along with the screen. Because of this, each time the screen is centered on the mouse, the mouse moves as well and then the screen never stops scrolling.
I've also tried alwas centering the mouse to the screen every time but for some reason, the Y axis movement is messed up.... To try this method, you'll need an extension to retrieve the resolution of the user's screen and the mouse object.
I just tried it, you've obviously been thinking too complicatedly. An active with mouse movement and a 'always-centre window on active object' does the trick nicely.
Nevermind, I figured it out. As a freebie for everyone else:
You'll need
- mouse object
- any object that lets you retrieve the screen resolution, or an object that can change the resolution
It's only one line:
Always
- set actual mouse to Xres of screen/2
- set actual mouse to Yres of screen/2
- center X screen to X of mouse
- center Y screen to Y of mouse + 24
Thats it! I have no idea where + 24 came from .... seems like a number mmf pulled out of its ass. Anyways, hope this helps other people who are trying to get this effect in the future. BTW, if there's a problem or limitation of this method, let me know.
with a custom made mouse cursor like, example: a sword
I just turn off "follow playfield" for this active object
and put cursor in top left game field, cursor should have same moving size as screen in game like 800x600 now it will always follow the screen not moving anywhere.