Construct 3 icon

Construct 3

Documentation

Mouse script interface

Ashley's avatar
Medal
Construct Team Founder
Published 3 Jun, 2019
87 words
<1 min

The IMouseObjectType interface derives from IObjectClass to add APIs specific to the Mouse plugin.

Note this class derives from the object class interface, not the instance interface. Typically it is used through runtime.mouse instead of the named object.

Mouse APIs

getMouseX(layerNameOrIndex)

getMouseY(layerNameOrIndex)

Return the current position of the mouse cursor on a layer, given by a case-insensitive string of its name or zero-based index. The parameter can be omitted for the default mouse position, which does not take in to account any specific layer's transformations.