When they insist in coming in "as a wave", use TROOPS to repel them as they would repel any other wave of invading enemy individuals.
If that means using force (including gunfire), so be it.
Do this once or twice, and the invading hordes will "get the message".
Addendum:
Situations like these might be a good proving ground for that new "active denial" weapon the military is supposed to have nearly ready...