The mediation of behavior through responses to cues in the world is known as Stimulus control.
Stimulus control is a term which is used in a behavioral psychology and it refers to phenomenon that happens when a living being acts in a single manner within the sight of a given stimulus and another path in its absence.