Stop mouse from tracking upward to top of screen

Just started using Construct 2? Post your questions here

Post » Wed Jun 25, 2014 1:47 pm

We have a game similar to pong, but the glove is along the bottom of the screen. The user controls the glove with the mouse and moves left-right across the x-axis to catch baseballs dropping from above.

We have noticed that even though we move the mouse back and forth, the cursor (which is hidden on the playing field) starts to track upward towards the top of the screen. The cursor is also visible to the left-right of the playing field when it touches the background image.

Once the cursor makes it's way to the top of the screen, the default pop-up menu in Chrome (the game must play in full screen) and interferes with the the mouse movement - causing issues in the game.

What is strange is when i move my mouse left-right in Word, or any browser the cursor does not track upwards. But in Construct 2 - this seems to happen automatically.

Is there a way to attach the cursor to the glove or prevent the mouse from tracking up to the top of the screen? Any help would be appreciated.

-Mark
B
3
Posts: 3
Reputation: 181

Post » Wed Jun 25, 2014 2:26 pm

You should probably the Browser fullscreen feature (tutorial), rather than manually pressing F11.

Otherwise third-part plugin Mouse lock with the compatible browsers can be of help.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,312
Reputation: 71,092

Post » Wed Jun 25, 2014 2:29 pm

You can use an "System > Every Tick" condition where "glove > Set X" is always on mouse.x and "glove > Set Y" is always on mouse.y .
And add another condition to it for instance: "Glove > Compare X" where X is always higher than a certain height or else it won't move the mouse cursor.
You can put the "Set Y" and "Set X" seperately inside the "System > Every tick" condition to make it so the glove still moves sidewards (mouse.x) but not upwards or downwards(mouse.y).

Hope this helped you a bit with your issue
B
6
S
1
Posts: 73
Reputation: 571

Post » Wed Jun 25, 2014 2:31 pm

Kyatric & Rezamertag,

Thank you both for your suggestions.

I have forwarded them to our developer and will get back to you with the results!

-Mark
B
3
Posts: 3
Reputation: 181

Post » Fri Jun 27, 2014 12:39 pm

We have installed mouse lock - but when you click to hide the cursor, the sprite does not move left or right. Is there an additional setting we need to implement so mouse movement still controls spite movement left and right?
B
3
Posts: 3
Reputation: 181


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest