Yes, law makers can prevent mass shootings. Human beings are subject to law and order. Instinctively, we like to be under the law. Only, the law can stop us being what we want to be. It is this law and order that makes human being different from animals. The law has more power than the Divine God. It is evident that people have more fear for the law than for God.
Taking away guns from people who are responsible enough to handle them safely is wrong. The majority of people who own them simply want the ability to protect themselves or their family, Even others around them, From people who are threatening them. It’s perfectly reasonable to want to be able to ensure that for yourself and your family, Because no matter how much you may support police, They will never be able to respond fast enough, And it’s ridiculous to rely on someone else to defend yourself or your family. Anyone who thinks they can rely on the police, A random person with their own life to worry about, To defend them in the same way, Has been tricked into believing in that system. To take that away will result in more innocent people being hurt because the people who want to do bad will find guns regardless. To excessively control guns would open up an illegal market for anyone to control. We made drugs illegal, And the illegal drug trade has become ingrained in our economy because there are billions of dollars to be made on people who want it anyway. The illegal gun trade would be no different. It would become easier for bad people to get ahold of them because there will be greater demand and more money involved. That is the bigger picture, A bigger problem that seems to never be discussed or considered. The only effective way to stop mass shootings is to prevent the attackers from getting to that point. The problems that lead to mental health issues in America are ignored because the government chooses to look at the results of them, Rather than the cause. Instead of focusing on the guns or the drugs, It would be much more effective to prevent people from resorting to those things. However, It would take a great change and an incredible amount of positivity as a society to make any sort of change. Even if that takes a long time, It will work much quicker and not allow the rise of illegal markets that only bring more violence.
This question assumes that the laws that are made by law makers can prevent mass-shootings.. and note that "prevent" is absolute, unlike "reduce".
Laws are only as good as those that follow them. Laws keep "Honest people honest", but do nothing in actually enforcing the behavior.
Also consider the psychology of the mass-murderer.. more often than not, mass-murderers suffer from mental illness or are mentally incapacitated in some way (drugs, alcohol etc). More often than not, mass-murderers suffer from depression and/or have a deathwish, often when that deathwish is not appeased, the mass-murderer commits suicide... people who want to die or kill themselves have no need or consideration for laws.
So no... no law written by a lawmaker can prevent mass shootings. I'd suggest that depending on the law, that a lawmaker could potentially reduce (or increase) mass-shootings, but certainly not prevent them as the question suggests.
Lawmakers have proved unable to stop other "vices" such as prostitution, illegal immigration, and the drug trade. All of these things are technically illegal, yet millions of people a year still commit these "crimes." If a person is crazy enough to want to commit mass murder, he is not going to stop his actions simply because it is illegal to do so.
Mass killings can not be prevented if the killer is determined to kill. These people are deranged, and will find a way if they really want to. That doesn't mean we shouldn't try and limit the weapons that are available, but if someone is bent on murdering a group of people, they will find a way.