Mouse positioning when it´s hijacked

For questions about using Classic.

Post » Mon Dec 07, 2015 11:20 am

Hi guys,
I´m working on a fast-paced, run&gun platformer, players have to shoot fast and they tend to click outside window game. I tried to hijack mouse by setting its position to the center of the window (using Window object and so). Then I create a sprite I called "CustomMouse" and I did this to establish position:
- CustomMouse x position: " clamp(.x+mousex-scrollx, scrollXLeft, scrollXRight)"
- CustomMouse y position: " clamp(.y+mousey-scrolly, scrollYTop, scrollYBottom)"


This works like a charm, but only if you keep moving the mouse, because it doesn´t scroll with the layer, mouse just remains in the last position it was when you moved, and I would like my CustomMouse also going along with the layer scroll.

Any help is very appreciated, and you will gain a place in my heart and in the game credits.

Thnx everyone in advance
B
6
S
1
Posts: 33
Reputation: 468

Post » Mon Dec 07, 2015 11:46 am

Message: Baconizer is not yet permitted to post plain text URLS (300 rep required). 1 URLS removed. Why?
I`ve found this in the forum, maybe an alternative to my problem, but link is broken.

B
6
S
1
Posts: 33
Reputation: 468


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest