general code for making something move in a certain direction | ScratchStats