I have got a rectangle drawn on the screen but need help. When I move it left to right it gets bigger. I want it to stay the same size and just move. Can someone please help me with my code
if btn(0) then x=x-speed end
if btn(1) then x=x+speed end
X1 and Y1 are coordinates on the screen for the bottom-right corner, not the width or height of the rectangle.
You might not want to have two different variables for a fixed size rectangle.
Try something like this maybe.
rect( x, y, x+width, y+height, color)
Width and height could be a number instead of a variable if the rectangle never changes size.
I hope this helps.
[Please log in to post a comment]