Page 1 of 1

Getting the mouse position

PostPosted: Fri 12 Jan 2018, 09:16
by Wafflingduck
Is it possible to get the mouse X and Y position? The context is that I'm making an object to see where the mouse is without using mouse over

Re: Getting the mouse position

PostPosted: Fri 12 Jan 2018, 17:08
by Lizard-13
You can use the expressions
Code: Select allMouseX("layer_name", camera_number)

and
Code: Select allMouseY("layer_name", camera_number)

The base layer can be referenced with the name "" (empty string). Finally, if you want the position in the base layer and the first camera (default layer and camera), you can use:
Code: Select allMouseX() and MouseY()


By the way, the basic turret tutorial explains it ;)