Control Mouse Cursor from keyboard??

Get help using Construct 2

Post » Mon Aug 28, 2017 7:16 am

NN81 wrote:
Niespor wrote:
NN81 wrote:Because with 8dir sprite go back automatically at mouse cursor point when i tale the control from keys to mouse

Yes. Didn't knew it is a problem heh. Why is it a problem? :D

This is a problem in my project.

Well there are ways to lock the mouse pointer at fixed location but it won't work in all browsers.
As for relocating mouse pointer - that's impossible with Javascript.
Image
B
9
S
2
G
1
Posts: 29
Reputation: 629

Post » Mon Aug 28, 2017 8:33 am

ok, but i need move the cursor not lock
B
13
S
7
G
4
Posts: 429
Reputation: 4,184

Post » Mon Aug 28, 2017 3:28 pm

I know you said it was not what you wanted, but I think it's easier to simply hide the real cursor and use a fake cursor which can be controlled any way you like. Then just figure out how to bypass your problem with 8 dir. movement. Shouldn't be that hard.
B
20
S
10
G
2
Posts: 56
Reputation: 2,762

Post » Mon Aug 28, 2017 4:09 pm

BadMario wrote:I know you said it was not what you wanted, but I think it's easier to simply hide the real cursor and use a fake cursor which can be controlled any way you like. Then just figure out how to bypass your problem with 8 dir. movement. Shouldn't be that hard.

well, if u know a way to trigger 8dir movement of a sprite WITH mouse movement please let me know, NO set position. TRIGGER 8DIR simulate control with mouse movements.
B
13
S
7
G
4
Posts: 429
Reputation: 4,184

Post » Mon Aug 28, 2017 5:38 pm

What exactly is sprite supposed to do? follow the cursor which is controlled by a keyboard? and control is basically 8dir movement?
B
20
S
10
G
2
Posts: 56
Reputation: 2,762

Post » Mon Aug 28, 2017 6:21 pm

Controllo mouse pointer from keyboard or trigger a 8dir sprite with mouse movement
B
13
S
7
G
4
Posts: 429
Reputation: 4,184

Post » Mon Aug 28, 2017 7:56 pm

Yeah, but if that doesn't work you have to fake it. So forget about controlling mouse pointer with keyboard and think how to fake it.

There is more than one way to achieve something. If Construct's 8dir. movement does not allow for mouse control, you use events to build your own 8 direction control that does.

Kind of the way it works with games. I wanted to use Box 2D physics in a fake 3D game. After 5 minutes it was clear it would be easier to just code my own physics ( good enough ) than to force Box 2D into doing something it was not designed to do.
B
20
S
10
G
2
Posts: 56
Reputation: 2,762

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests