Maybe you should add comments about the variables TREE1, TREE2 and TREES$. Remember that not everybody is aware of your code. Thing that i see wrong: - Surround that code on a for-next. - Handle other sprites (Currently, you're handling the sprite 9) I can help you with that part of the code if you post the key.