Change mouse cursor

Get help using Construct 2

Post » Thu Sep 29, 2011 9:07 pm

In game maker you can change the mouse cursor to a sprite is there any way to do that in construct2?
B
14
S
4
G
2
Posts: 42
Reputation: 2,046

Post » Thu Sep 29, 2011 9:12 pm

One way is to use any sprite you wish and just set the sprite x = Mouse.X and sprite y = Mouse.Y every tick.zenox982011-09-29 21:28:20
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,847
Reputation: 48,295

Post » Fri Sep 30, 2011 3:08 am

Yes, but then the cursor will still exist over the sprite. I too wonder if cursor replacement is possible.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Fri Sep 30, 2011 3:38 am

I have wondered this too.

It would be particularly useful in games where you "place" a sprite on the screen, such as Tower Defenses and RTS type games.

B
21
S
5
G
2
Posts: 26
Reputation: 2,512

Post » Fri Sep 30, 2011 8:23 am

If there was an option to hide the cursor - like in CC - then using the sprite way would work. As it is, see THIS post and response from Ashley regarding a similar request.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,847
Reputation: 48,295

Post » Fri Feb 22, 2013 7:20 am

Ok try this..
My Sprites ive added called poweroff and reset.
Hand relates to mouse set cursor style hand.

1) Mouse | Cursor is over poweroff | mouse | set cursor to hand
2) System | else | Mouse | Set cursor from sprite "Your Sprite" Sprite
3) Mouse | Cursor is over reset | mouse | set cursor to hand
4) repeating step 3 for all other objects you need to select from.

Note: Otherwise mouse is always set to your sprite anywhere else
Which works in all browsers as well.
B
5
Posts: 12
Reputation: 699

Post » Fri Feb 22, 2013 7:31 am

Set mouse curser to none hides the mouse.
Set mouse curser from sprite to change to your own

For more information see
https://www.scirra.com/manual/114/mouseRamPackWobble2013-02-22 07:34:33
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Sun Mar 31, 2013 5:53 am

For "Set mouse cursor from sprite" is there a way to set it back to the default mouse? Like if there's a UI element that changes your mouse sprite to put down a building, it would change your mouse to the building sprite, and once you create the building it would change it back to whatever the default mouse cursor is?
B
3
Posts: 1
Reputation: 277

Post » Sun Mar 31, 2013 4:08 pm

@IcePotato There's the 'Mouse: Set cursor style' action. You can set it to 'Normal'.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020

Post » Thu Apr 18, 2013 8:21 am

you can set a global variable for mouseover and then a button click for your building and set the global variable to 1. and when ever its set to 1 by using cursor is over building and inverting it you can change the type of cursors by setting them from sprite and also setting that sprite's x, y coordinate to the mouse and choose another mouse button like the right button when ever clicked it changes back the mouse cursor to the usual one you have along with setting the building cursor to lout of layout or something. i hope it helped you, otherwise i can send you a little demonstration with the help of a construct file..there might be other simple ways to do it but i figured this out for my own game..
Udain Tomar
Game Designer
B
6
S
1
Posts: 34
Reputation: 695

Next

Return to How do I....?

Who is online

Users browsing this forum: jeffige, Yahoo [Bot] and 0 guests