You can ban guns, but the people who are doing these shootings are mostly purchasing the guns illegally. Do people honestly think that if you pass a law banning guns, these people will go "oh, well I was gonna buy that .45 off of Bob, but since that law was passed banning .45s, I won't get it."??? No, they will just continue to go underground...buy those Russian AKs that seem to stream in along with the cocaine from other countries. Just like they do now.
Machine guns are banned now & are difficult to get so very few crimes are committed with them now. I don’t suggest banning all guns at all, but if certain types of guns are banned, they’ll be harder & harder to get. Most of these shooters are opportunists. They’ll still commit these types of crimes, but the hope is that they won’t be able to inflict as much damage as quickly.