How to get sprite position

I'm using the crank. My goal is the use the crank to make a sprite move down, but only so far. However, I'm not sure how to get the position of the sprite once I've drawn it on screen. I was thinking I could do sprite.y > 10 do something.

I tried using getBounds, but it only returns 1 number and doesn't seem to change when the sprite moves down so not sure what I'm getting there.

I suppose I could keep track of where the sprite was, and how many I moved it down manually. Thinking I shouldn't have to do that though.

Ok welp seems like I was able to answer my own question. Looks like you CAN do sprite.y or sprite.x and it returns a value.

Was searching through the documentation on sprites and only saw getBounds at the time so figured that was it. Right in "Sprite Basics" is the verbage to get the position and individual properties.

1 Like