While Ammon may have been confident in Yahweh’s protection, he prudently first used his long-range weapons, killing six with stones from his sling (v. 38). During this time, the assailants also began to sling stones, though their aim was inaccurate. Failing to bring him down with stones, they “came forth” with clubs for hand-to-hand combat.
At this range, stones would be ineffective. At close range, too, the odds of several against one now distinctly favor the attackers. (I discuss weaponry in the commentary for the next verse.)