Reflexes have been viewed as integrated motions with the centrally generated motors commands to produce adaptive movement. In this paper, a walking pattern generator for humanoid robots based on piecewise linear functions and inspired by passive walking is considered. To deal with lateral and frontal disturbances, sensory feedback is realized based on the inverse pendulum model. The reflex system that highly adapts and controls the movement of the humanoid robot, when a large disturbance occurs, is combined with the motion pattern generator and proposed in a unified form with regards to three types of sudden events. Experiments using Fujitsu's humanoid robot HOAP-3 demonstrate that a reflex movement is successfully integrated with the rhythmic motion when there are sudden changes in floor level, when obstacles suddenly appear, and in the presence of a large disturbance. The proposed reflex system therefore contributes toward the safe interaction of humanoid robots with the environment.