I'm not sure if this would mess up the way you have set up your code but here is this
Basicly, it lets it move around on the x and y axis but stays at 0 on the z axis.
PositionEntity entity,EntityX(entity),EntityY(entity),0
Basicly, it lets it move around on the x and y axis but stays at 0 on the z axis.