There are already 20,0000+ firearms laws in America. They are regulated at the Federal level, the State level and in many circumstances at the county and city level as well. They are probably the most regulated product in existence.
As I understand, the shooter walked into a store, bought his weapon, came back 30 days later for a second weapon and that's it. How is that regulated? He didnt want a concealed weapon's permit, he wanted a gun. There was no background check or if there ever was, it's exactly worth shit
You say you cant legislate behaviour. I think what you cant legislate is desires and drives in people. Depending on what obstacles the person faces in the way of living out those desires, he will or will not live them out. It just depends on whether the drive is strong enough. So maybe a stricter regulation on guns would have increased the obstacle just enough to make him wait long enough for someone to notice something was wrong, or maybe he'd rethink his plans. Or maybe not, but at least then you would have done something.
You say he could have gotten the guns from any gang and/or someone with the right connections. But seeing how he was socially incapable, didnt talk to anyone, was in contact with no one, how would he have known where to get the guns? Or if he did, would he have had the courage to go talk to them?
So yea, by increasing the obstacles Im pretty sure you can legislate behaviour.
I realise this guy was determined to kill people like no one before and that you'll never stop those with just enough dedication. I dont see the point in making it easier for them either though. What if a background check was obligatory for just the purchase of any gun? If you want a weapon, you can still get one, Im sure a real enthusiast will wait the one or two months it takes to pass the background check, no?