There is and will be no solution to these types of incidents in America.
As a nation, they have chosen to to have access to guns. With that, the acknowledgement that sometimes mass shootings will occur.
I feel that is their choice, and their punishment.
I was treated to a day at the gun range on my last visit. Thoroughly enjoyed it. I can certainly understand the attraction of a gun hobby. In a healthy/safe environment, guns themselves aren't the issue.
The problem is guns aren't restricted to a healthy and safe environment. Basically anybody can get access to them legally or otherwise. People who wouldn't be deemed fit to own a pet can get access to quite frankly terrifying weapons.
What is stupid is the types of guns available. Semi automatic assault rifles are not needed for home protection.
Also the amount of weapons one person can own seems limitless. I went to my friend (of a friends) (gun) basement, and all the walls were lined up with every type of rifle/handguns known to man. I was shocked and more than a little worried that one person had so much firepower.
So you (or the state) are basically relying that his mental state remained, and he wasn't the type to go mental to avoid another post in this very long thread!