holuzs Posted February 9, 2019 Share Posted February 9, 2019 Hello. I started make a movable and a scalable interface. The moving is working, but the scaling not. local cursorX, cursorY = getCursorPosition(); cursorX = cursorX * x; cursorY = cursorY * y; if cursorX<=hpDefX+hpDefSX-12 and cursorX>=hpDefX+hpDefSX and cursorY<=hpDefY+hpDefSY-12 and cursorY>=hpDefY+hpDefSY then print("Sizeing") else hpDefX = cursorX - moveHPX; hpDefY = cursorY - moveHPY; end (hpDefX & hpDefY = bar position) (hpDefSX & hpDefSY = bar size) Link to comment
WorthlessCynomys Posted February 9, 2019 Share Posted February 9, 2019 GetCursorPosition return the relative position as the first two. You don't need to multiply it. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now