Detect a Hidden Foe
Use your sight, hearing, or even sense of smell to detect the presence of lurking enemies. See examples. The GM will usually call for a Wisdom (Perception) check. (77, 82) Make sure you describe your effort!
Keep in mind that:
-
Poor lighting, fog, and other obstructions may give you disadvantage.
-
Moving at a fast pace can give you disadvantage.
-
Natural obstructions may limit how far you can see.
-
There are limits on how far you can hear.
-
See DMG 244 for Tracking DCs.
Using magic. Sometimes you can use spells or magic items to help you discover a hidden foe.
Passive Perception. Even if you are not actively searching, the GM can determine whether you detect the presence of a hidden enemy in passing through use of a passive Wisdom (Perception) check. See the example.