How do I change the opacity of the mouse cursor

0 favourites
  • 6 posts
From the Asset Store
Cursor Magic
$2 USD
80% off
Mouse cursor is something that the player controls and sees all the time, that's why it is so important to make it cool!
  • Hi.

    I thought I had it figured it out by adding a sprite to the mouse cursor. But I need to change the opacity of the graphics, but even though I change the opacity of the sprite used as the mouse cursor, nothing happens.

    Is the mouse cursor special, so you can't apply changes to the sprite used for the mouse cursor?

    I found this in the manual, so it sounds kind of special.

    "Set cursor from sprite

    Set the cursor image from a Sprite object. This is preferable to setting a sprite to the mouse co-ordinates, because the input lag is significantly lower. Various limitations apply: the sprite image is used as it appears in the image editor, not taking in to account size or rotation in the layout; the image cannot be too large (64x64 is usually the limit); and support varies depending on browser and OS."

  • Well I guess the answer is: YOU CAN'T

    I have made more tests, and it looks as the only thing you can do, is to change the graphics, by changing the cursor to a different sprite, or switch to the build in standards.

    What I still do no know is if you are able to animate the sprite, or if you are stuck with a static image.

  • ......

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But I can suggest you a one answer to change the opacity of mouse cursor!.(even you can use a animation for cursor with this solution)

    Try this :

    On the start of layout -> set cursor style to "none"

    in System every tick -> set position of sprite ( that you need to use as cursor sprite ) to Mouse.X and Mouse.Y

    When you need to change the opacity, just call set opacity on that sprite

  • ......

    Hi Korbaach.

    I have downloaded your project but is is the latest beta update. I will have a look as soon as a new stable layout is released, since I always stick with stable releases in all my software.

    I am new to construct 2, though so maybe that is a mistake

  • But I can suggest you a one answer to change the opacity of mouse cursor!.(even you can use a animation for cursor with this solution)

    Try this :

    On the start of layout -> set cursor style to "none"

    in System every tick -> set position of sprite ( that you need to use as cursor sprite ) to Mouse.X and Mouse.Y

    When you need to change the opacity, just call set opacity on that sprite

    Hi tharindutpd

    What you are doing is basically moving the sprite to the cursor position. I understand that, but when I read the manual, it is not recommended to do that (performance wise). Is the manual wrong?

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