Social isolation, maybe undiagnosed mh, easily influenced by other gamers, a desire to be noticed/talked about or feelings of grandeur, desensitized from viewing so much violence and playing violent games, hating a particular group of people (along with those you game with) and of course easy access to guns
Of course it can be a factor as many things can be that doesn’t mean it’s the the cause as the the persons actions is what kills but what led them to commit a mass shooting will be a number of factors it’s rarely just one but the fact that so many people can be killed at one time is down to them having a gun/guns
Would they commit another type of violent crime if they didn’t have access to a gun we don’t know but certainly there would be less fatalities