Is there any way to change mouse cursor to sprite when it hovers over certain object?
Yes !
Take look on mouse action, you are available to hide the (OS) mouse cursor, just think about using a key for example hide/unhide it (because without mouse cursor you won’t be able to quit the preview !) when you’ll test it.
So the first step would be hide the cursor, the second is to give your sprite the mouse position in an event (the syntax of the action might look this, the action is in “objects” action) :
DO Mouse.x();Mouse.Y() to position of Object
Basically, i suggest you to first replace the mouse cursor, hide it only when you’ll export the final project to avoid bad joke. At last, you’ll have to combine these action with mouse cursor condition => when the cursor is on someObject, create sprite “MyCustomCursor”, DO Mouse.x();Mouse.Y() to position of “MyCustomCursor”, etc.
i hope it’s clear, feel free to ask help if needed.
Thank you. It works.
Now I have a new problem. The cursor works fine with computers but when I play the game on a touch screen of a smaller device I don’t want the sprite to appear when I press the screen. Is there any way to hide mouse sprite on a smaller resolutions.
Hum i don’t know if the properties windowScene.Width() and Height() exist on html 5 platform, but basically if can create a condition to detect the size, yes it’s possible.
What is the problem with cursor sprite changing on screen touch (on small device ?) ?
I think I manged to find the solution to problem. But my boss says that he doesn’t mind seeing the small sprite when a person touches the screen. But thanks any way.