It's a little surprising when a mass shooting gets a lot of attention these days; we've seen so many of them over the years that they usually have to contain some especially shocking element (like last year's famous one, almost exactly a year ago). People often seem to think about these things as a sort-of disease.
For a long time we tried to understand how the disease was spread -- was it by violent video games? Movies? -- but that kind of efficient cause proves elusive, and for good reason. There is no such cause. The actual cause is not the efficient cause but the choice of the individual killer. They are doing these things for reasons of their own.
In spite of what we hear from determinists, humans are not pinball machines. We don't do X because we experienced Y; rather, we ourselves determine what experience Y means. We do that according to our beliefs, attitudes and upbringing, informed by far from determined by our physical makeup. The determination of meaning, and the decision of what to do about the meaning we find in the world, is a spontaneous process in the sense that it arises at least as much from our concepts as our biology.
Since concepts are invisible, we cannot prevent the free choice of evil. We can sometimes predict it, but often we cannot.
So: a certain number of people are going to decide to become killers. What to do about it?
One idea we often hear is that we should restrict access to firearms. There are reasons not to do this arising from the broader nature of human life, and the free citizen's relationship to the state. However, there are also reasons not to do it within the context of the problem. The first one is obvious: an armed citizenry can sometimes stop these attacks, whereas a disarmed citizenry is much more vulnerable.
Carrying a gun is kind of a pain, really, and the odds that something like this shooting will come up are small enough that most people may not think it's worth the hassle. However, a former Marine who happened to take his pistol to the movies that night could have stopped the attack earlier. This is in fact the best defense to an attack in progress, since it is an unpredictable factor from the point of view of the killer. He can avoid the police, but he can't be sure about the concealed weapons in the audience.
There's a second reason that is less obvious. The kind of mind that chooses this path is capable of worse. Even Timothy McVeigh, far from the smartest man in the world, could concoct a huge bomb. This fellow appears to have been brilliant: there's no limit to what kind of harm he could have created if he had chosen that route.
This is to say that the easy availability of firearms, and the glamour they are endowed with culturally, acts as a kind of brake on the harm done by mass killers. Firearms are less deadly than bombs, they take longer to do their work, and you have to be right there operating them in person. That exposes you to being stopped mid-act by armed citizens, and potentially even to the police arriving (although that is unlikely, since 'longer than a bomb' is still only 'a few minutes' rather than 'instantly'). You are available to be stopped before the harm is completed. You're easier to catch afterwards. Finally, a single person with a firearm can only kill so many people because of weight limits on how much ammunition he can carry.
For all these reasons, the best response is to encourage the carrying of arms by citizens, and to continue to glorify the gun. The last thing we want is for the evil among us to innovate.