Recently, it has been shown that humidity can increase the adhesion of the spatula pads that form the outermost (adhesive) surface of the tokay gecko feet by 50% relative to the main adhesion mechanism (i.e. van der Waals adhesive forces), although the mechanism by which the enhancement is realized is still not well understood. A change in the surface hydrophobicity of a gecko setal array is observed when the array, which supports the spatulae, is exposed to a water drop for more than 20 min, suggesting a change in the hydrophilic-lyophilic balance (HLB), and therefore of the conformation of the surface proteins. A surface force apparatus (SFA) was used to quantify these changes, i.e. in the adhesion and friction forces, while shearing the setal array against a silica surface under (i) dry conditions, (ii) 100% humidity and (iii) when fully immersed in water. The adhesion increased in the humid environment but greatly diminished in water. Although the adhesion forces changed significantly, the friction forces remained unaffected, indicating that the friction between these highly textured surfaces is 'load-controlled' rather than 'adhesion-controlled'. These results demonstrate that the gecko adhesive pads have the ability to exploit environmental conditions to maximize their adhesion and stabilize their friction forces. Future designs of synthetic dry adhesives inspired by the gecko can potentially include similar 'smart' surfaces that adapt to their environment.