(5e DnD)
Say some goblins set an ambush. They are actively hiding in the hopes of surprising unassuming travelers.
The path of our adventures just so happens to cross this ambush. If they take no active action (from what I've seen around), you make the goblins roll Stealth against the passive perception of the party. Anyone whose passive perception is lower is now surprised when combat starts.
But what if the party has some indication that there might be an ambush. Maybe the ranger has dealt with goblin ambushes before. Perhaps the goblins didn't clean up very well after their previous ambush.
So one the players declares "I think there might be an ambush, can I actively search for enemies?".
What is the "correct" ruling on this?
You could make the (relevant) goblins make a stealth check. But would you have to roll another check when combat starts, to determine surprise, or do you reuse the previous one?
Say all but one goblin gets spotted, would the party still get surprised from the last one, rendering the active check useless? Or the opposite if only one goblin of 5 gets spotted, does it nullify the surprise of all other goblins?