At the beginning of the prorgam add a wait block for the ultrasonic sensor in order to detect prey.