Possibly, put an invisible hollow cylinder around the player or if the player steps outside the boundaries of the sphere (check using vec_dist), before the wait instruction move the entity to the boundary by moving it to the border of the cylinder in the direction it is from it's centre. Hope that makes sense.