Sorry that this is a long answer, but it's a complicated problem.
What can be done to help prevent mass shootings? I find it helpful to break the problem down 3 ways: internal vs external threat, left or right of bang, plus hard and soft measures. Internal threats are insiders, members of the community who lash out. Parkland FL, Great Mills MD, the DC Navy Yard, and San Bernadino all involved insiders shooting up their school or their work colleagues. Mother Emanuel Church in Charleston is an example of an external threat, an outsider who comes in and shoots people.
Academics favor “soft” measures to prevent school violence, including counselors, therapists, social workers etc. providing services to kids at risk. These measures are all worthwhile for lots of reasons besides just violence prevention. These are things we can do left of bang, i.e. before the first shot. They can help reduce the internal threat, but they have no impact at all against the external threat.
Some folks favor “hard” measures like security doors, metal detectors, armed guards, armored schools. These measures will have little impact on the internal threat. With patience and imagination, students can bypass these measures just as inmates in a prison do. Hardening can help reduce the external threat from outsiders, if only by causing them to move on and look for a softer target.
Gun free zones are the opposite of hardening. They guarantee the target is soft, and they advertise that fact – a massively stupid idea on many levels. IMHO, all laws restricting the right to carry on campus should be eliminated immediately. Licensed staff, faculty, parents, coaches, babysitters, bus drivers etc. should all be permitted to carry on campus just as they do off campus. I’d be happy to provide free instruction and coaching to any school personnel who want it, and I imagine there are many qualified instructors like me in every school district in the country. I’d encourage the local police departments to define training standards and to help with the training/coaching/practice for the community, with particular emphasis on how armed staff should behave once Law Enforcement arrives.
IMHO, schools should be hardened to the point that people who don’t belong there can't enter the buildings without first checking in with the office. Further physical hardening starts to make the school feel like a prison. I think licensed staff and faculty should be permitted and encouraged to carry on campus if they so choose. I think licensed members of the community should also be permitted to carry on campus, including parents, nannies, uber drivers, etc. I think that staff should also be trained in first aid, with particular emphasis on treating major trauma from gunshot, cut, or blast. Whether or not they choose to carry, they should all know how to keep a victim alive until the ambulance arrives. They should have access to and know how to use tourniquets, hemostatic agents, chest seals, decompression needles, CPR, etc.
To summarize what can be done: Left of bang we have “soft” measures providing social services to at-risk kids, and “hard” measures securing the facility and training the staff and faculty in firearms if they so choose, in first aid, and in handling disasters like active shooter, bomb blast, slasher, etc. If all goes as planned, the soft measures neutralize internal threats, and the hard measures defend against external threats, so there is no bang. If all that fails, and we find ourselves right of bang, we put all that training into play, neutralizing the threat and treating the wounded ASAP.
Finally, there are some really bad ideas floating around that I’m strongly against. Unsupervised lock boxes on campus are a really bad idea. Basic metal shop tools can defeat any lock box. Off-body carry is another non-starter. If you’re going to bring a gun to school, it must be under your direct control at all times, not in a purse or locked a drawer or closet. Forcing teachers to carry against their will is another really bad idea, though I don’t think any shooter ever suggested such a thing. Prohibition has never worked, whether prohibiting alcohol, illegal drugs, guns or magazines of any sort. The black market will always meet demand.