(Another post from the KenzerCo message boards, here for easy reference)
Let's say 4 goblins ambushs 4 PCs. The goblins will use standard goblin stats; he humans will be, for our purposes, a Man-at-Arms, a Brigand (with Improved Awareness), A Laborer, and a Sedentary ('cause they're all together in the HoB).
Goblins are in a prepared ambush, have their weapons ready, and are going to go. They will be rolling d3+3 for initiative (because Goblins have a +3)
The Brigand (B) and the Laborer (L) noticed the goblins; the Man-at-Arms (M) and the Sedentary (S) (engaged in a petty argument) do not.
Initiative rolls for the party are:
L d8+5 ("Can hear opponents in a concrete direction, but not see them", p 216 of PH)
B d6+2 (Same as the Laborer, but he gets 1 initiative die smaller)
Everyone rolls their die and gives their total. Initiatives are:
Because the Brigand rolled poorly, all the goblins will get to act before he does and, unless the first goblin hits someone, the goblins will all act before the party. If Goblin 1 hits someone, that person will go on 4 (the goblin's initiative) +2 (page 217, last paragraph of second column), or 6, which is the same time as Goblin 4. We'll say that the Sedentary got hit by Goblin 1. Goblins 2 and 3 fire normally on an entirely surprised party, but they miss. Goblin 4 also fires, but S is not surprised when he does so. If this were melee combat, surprised characters would be rolling a d8 defense die, with no bonus... but since the goblins are shooting at moving (walking) targets, the party still gets a d20 defense die (p. 218 of the PH). L & M might get the cover value of their shields, depending on their arc of defense (p. 224, 225 PH).
So, Goblin 1 hit S, whose new initiative is 6. S is a bit of a wuss, and starts screaming bloody blue murder (he's been ToPed, but you can still start screaming "I've been shot" while ToPed, IMO, which counts) on 6. This means he is "Raising the Hue and Cry" (p. 217 of PH), and everyone's initiatives drop by 2. This doesn't affect the goblins... they've all gone. With an 8 speed on a snapshot, the Goblins will be going again on 12, 13, 13, and 14. Normally, G1 would be able to fire on a surprised M with his second shot, but S's Hue and Cry means that the new initiatives are B 7 (it decreased by 2, but can't act before the second after the Hue and Cry), L 7 (dropped by 2), and M 11.
Now, with B moving towards them (and probably telling his friends where they are), the goblins might wind up changing their next actions entirely... if B and L start walking towards G1 on 7, G1 will have a couple seconds to drop his bow and ready his weapon... and he doesn't really need any, since he's got a Small weapon, which takes 0 seconds to ready. G1 drops his bow and draws his short sword on 7 (it's a 0 second action). G2, next to G1, also draws his short sword; G3 and G4, on the other side of the cavern, decide to keep firing. L & B reach their goblins on 9 (L is NOT readying his shield, since it will take too much time), and there's a brief reach comparison, which G1 loses (he's a goblin, they're humans). L and B start smacking goblins on 9; With a speed of 8, B will get his next attack on 17, and L will get his on 19 with his speed of 10. G1 and G2 will get their next attack on 18... since they had a shorter reach, they have to wait until second 10 to attack (p. 223).
On second 11, M gets to act. He stays put, standing over S until he's better, readying his weapon and shield. Readying a shield takes 1d4p+1 seconds; he'll have his shield readied on 15, but his sword will be readied on 12 (1 second ready time; p. 218). This means G3 (count 13) and G4 (count 14) will get shots on an unshielded M, who only gets to roll a d12 for defense (since he's standing over S). This is why you wear armor, kiddies.
At this point, everyone (except S) is up and engaged and the regular combat continues. Due to a rough roll on B's part, the goblins had 3 seconds of surprise... had B rolled a 3 (5 total), G1 would've been the only one with complete surprise. Had B rolled a 1 (3 total)? He might have thrown a dagger on 3 (0 ready time, plus a snapshot), injuring one of the goblins, and catching THEM by surprise.