the position (playerx,playery) is at the top lefthand corner of the player, use playerx+1.5,playery+2 it's not exact (playery+1.96875 is right) but there is hardly a difference so it doesn't matter
onwall is a function
ack, I just noticed, don't use a while loop for that, use a timeout