User Tools

Site Tools


crpl:docs:getmouseposition

<- CRPL reference <- Input Commands

GetMousePosition

ArgumentsResultNotation
X and Y pixel coordinates of mouse – f1 f2

Description

Pushes the X then the Y pixel coordinate of the mouse to the stack. 0,0 is located in the LOWER LEFT of the game map with positive X going right and positive Y going up.

Examples

#Move a sub image called 'thing' around to follow the mouse
GetMousePosition ->y ->x
SetImagePosition(Self "thing" <-x <-y -0.01)
crpl/docs/getmouseposition.txt · Last modified: 2021/02/05 11:44 by Karsten75