Returns the x coordinate of the mouse in the window.


GML Code Example


Returns: Real


With this function you can get the x position of the mouse cursor (in pixels) within the browser if it is an HTML5 game or within the display if it is a Windows, Ubuntu (Linux) or MacOS game.


GML Code Example

wx = window_mouse_get_x();

The above code stores the current x axis window position of the mouse in the variable "wx".

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here