Stop event movement on collision?

Is there an easy way to have an event move constantly in one direction only stopping once it collides either with the player, another event, or a tile it can't pass through?
Should do that by default if it's on the player level.
The event itself stops moving but the movement processing continues. For example I have a boulder that has is set to move away from the player when clicked I set it to repeat so that it will move indefinitely. The problem is that if I check wait for completion when the boulder collides with something I can't move if I don't check it the boulder will continue to move away from the player when I get close to it again.
What about conditional branches?

Original thread: https://forums.rpgmakerweb.com/threads/stop-event-movement-on-collision.83484/