the speed of the mouse pointer in Construct 2

0 favourites
  • 12 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hello Guys

    i have one question.

    How to change the speed of the mouse pointer in Construct 2

    without changing the settings of the windows

    thanks in advance

  • Hello Guys

    i have one question.

    How to change the speed of the mouse pointer in Construct 2

    without changing the settings of the windows

    thanks in advance

    As far as I am aware you can't.

    The mousemove events - so Google tells me - are generated by the browser, and so you are receiving them as fast as the browser is generating them.

  • Although I think it would make the game less playable and intuitive you could always try something like this:

    create a sprite that will represent your mouse-pointer, give it the bullet-behaviour and (turn of set angle) set the speed to the speed you want..

    On start of layout set the mouse pointer style to none

    Every tick

    set the angle of motion to angle(sprite.x,sprite.y,mouse.x,mouse.y)

    set the speed to your desired speed..

    if distance(sprite.x,sprite.y,mouse.x,mouse.y) < a certain amount

    set the postion of the sprite to mouse.x,mouse.y

    set the bullet speed to 0

  • Just thinking out loud. If you wanted to slow the mouse down then you could hide the mouse, create a mouse sprite and have this sprite move towards the mouses position. I guess you would then have to write your own conditions e.g. if the mouse is clicked then you would have to check what the sprite was over rather than relying on the mouse conditions.

    If you wanted it to go faster then I guess (definitely not tested) you could go through loop of remembering where the mouse was compared to when it is and then multiplying this distance by the required amount. You would then need to move the mouse to this new distance and start to loop again. No idea how jerky this would be.

    Edit - I wish I could type faster.

  • Example of RamPackWobble and my suggestion

  • Ok, see if the sample solve in your case.

  • Thanks for the help, but it does not work as a standard mouse in windows OS. Sometimes she twitches and late. Before that I tried everything, from 8 directions, but the bullet etc ... But nothing has not worked. I am confused by the fact that the developers have not considered such an important thing in a plugin mouse. Sorry for my english

  • Thanks for the help, but it does not work as a standard mouse in windows OS. Sometimes she twitches and late. Before that I tried everything, from 8 directions, but the bullet etc ... But nothing has not worked. I am confused by the fact that the developers have not considered such an important thing in a plugin mouse. Sorry for my english

    Which developers are you refering to?

    Those that make browsers?

    "Sometimes she twitches and late.."

    Because we can't acces the speed of the mouse directly, it still moves at the same speed, so this is only a way to slow down the movement of the cursor while moving, the moment you stop moving the mouse it could well be the cursor hasn't caught up yet..

    the twitching can be avoided with some tweaking..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I mean , the developers construct 2. Because a mouse is connected via plug-in construct 2.

  • I mean , the developers construct 2. Because a mouse is connected via plug-in construct 2.

    It just isn't possible..

    Games exported from Construct2 are html5/javascript-based and run in a browser-environment..

    Javascript can't get control over the cursor/mouse..

    These settings are handled by the operating system to which you can't get control from the browser..

    You could ask the browser creators to make hijacking computers easier by giving websites acces to system settings, but I don't think they'll see benefits..

    You can hardly blame the Construct2 developers for not giving acces to something that isn't accesible..

  • I mean , the developers construct 2. Because a mouse is connected via plug-in construct 2.

    Did you read my post? This is nothing to do with C2.

    Use Google for more information.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)