From what I've seen, it seems to be similar to the vast majority of mass shootings in terms of the buildup; A man is known by his friends and family members to clearly be disturbed and show the warning signs of being at risk for violent behavior well in advance, and yet none of them get off their butts to do anything about it until it's too late. That was the case with the Columbine shooters, with the Virginia Tech shooter, with Jared Loughner, with the Aurora Movie Theater shooter, with the Sandy Hook shooter, and on and on and on. Nine times out of ten, the shooter's loved ones KNEW he was dangerous, and yet they did nothing.
You want to know the best way to stop mass shootings; Some kind of campaign to help educate the public on the warning signs that a person may be at risk of committing a violent act, and (This is key), if they know someone demonstrating those signs, encourage them to act on it and ensure the person is stopped and gets the professional help they need before it's too late.
For an example of this principle in action, shortly after the Aurora Movie Theater shooting, another disturbed man plotted a similar mass shooting for the midnight premiere of 'The Twilight Saga: Breaking Dawn, Part 2.' Fortunately, his family noticed he was seeming odd lately, did a little digging and realized what he was planning, and they ACTED on it: They called the cops, he was arrested, and God knows how many innocent lives were saved by their courage and quick thinking.