Set cursor from sprite

Discussion and feedback on Construct 2

Post » Mon Apr 18, 2016 4:17 pm

Hi, if I'm not mistaken this action serves to change the graphic cursor.

But do not anything, the cursor is the same of the windows.

Image

What am I doing wrong?
B
31
S
13
G
21
Posts: 844
Reputation: 14,693

Post » Tue Apr 19, 2016 12:07 am

Try,
On Start of Layout --> Set Cursor (none)

Every Tick --> Set NewCursor Position to Mouse.x, Mouse.Y

(NewCursor is the custom cursor your using, which is a separate sprite, change the name if you want)

I think this is what your asking.
I don't think I could ever stab someone, I mean, let's be honest. I can barely get the straw into a Capri Sun.
B
26
S
10
G
7
Posts: 91
Reputation: 6,420

Post » Tue Apr 19, 2016 7:24 am

From the manual:

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.
https://www.scirra.com/manual/114/mouse

Also, here's Ashley's answer for this in a different topic:
quot-set-cursor-from-sprite-quot-doesn-039-t-work_p606372?#p606372
B
137
S
33
G
17
Posts: 1,560
Reputation: 20,802

Post » Tue Apr 19, 2016 8:23 am

I had already read the manual and see the limitations but the cursor still did not work, the object it is a sprite of 16 x 16.
In chrome, windows.
B
31
S
13
G
21
Posts: 844
Reputation: 14,693

Post » Tue Apr 19, 2016 12:27 pm

Then I suggest you make an example capx and fire a bug report. There might be something broken.
B
137
S
33
G
17
Posts: 1,560
Reputation: 20,802

Post » Tue Apr 19, 2016 12:43 pm

Mirlas wrote:...the object it is a sprite of 16 x 16


it is really 16x16 or you set only in Properties panel to 16x16 ?

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Apr 19, 2016 1:20 pm

I just did a quick testing. It only works if you have the sprite you want to set already on your layout.
B
137
S
33
G
17
Posts: 1,560
Reputation: 20,802

Post » Tue Apr 19, 2016 3:38 pm

Thanks for the help but I can not change the icon of windows.

https://dl.dropboxusercontent.com/u/60803633/test3.capx
B
31
S
13
G
21
Posts: 844
Reputation: 14,693

Post » Tue Apr 19, 2016 3:47 pm

korbaach wrote:
Mirlas wrote:...the object it is a sprite of 16 x 16


it is really 16x16 or you set only in Properties panel to 16x16 ?


your sprite is 250x250px!!!!!

Image


Resize your sprite

Image
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Apr 19, 2016 4:15 pm

Ouch!!, ok, thanks!.
B
31
S
13
G
21
Posts: 844
Reputation: 14,693


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests