(CNN) The suspect who opened fire during a Madden video game tournament in Jacksonville, Florida, on Sunday actively targeted other gamers in his shooting spree, Sheriff Mike Williams said.

David Katz, a 24-year-old gamer from Baltimore, Maryland, was in town for the tournament at GLHF Game Bar at the Jacksonville Landing, a downtown shopping and dining complex. He walked past patrons in other parts of the restaurant and then opened fire on his fellow competitive gamers before killing himself, Williams said.

The shooting left two people dead, 10 injured from gunshots and one person with a non-gunshot injury, Williams said. All of the injured are expected to survive, he said.

"As bad as this is, it could have been much worse," Williams said.

Katz's motive in the shooting remains under investigation, police said. The suspect had legally purchased two weapons in Baltimore over the past month, and one of the weapons had a laser sight that attached to the gun, officials said.

Alexander Madunic, a gamer who was shot in the foot, said the shooter lost a game in the Madden tournament earlier in the day and was angry.

"He was kinda upset about that, so I'm guessing that had something else to do with it, too," Madunic said.

Confusion, chaos and bloodshed

Tony Montagnino told ABC's "Good Morning America" he was the shooting victim who shouted those words.

"My first reaction, I heard the shots and I thought, 'Why is there firecrackers in here?' " Montagnino said Monday.

"And then I actually got hit. And I've never been shot before. So I didn't know what to think. And then I turned around and actually saw the flashes from the gun. And at that point (I) just went into survival mode, and I just wanted to make sure I was out of there."

President Donald Trump expressed sorrow for the victims in remarks before an evangelical leadership dinner at the White House on Monday.

"I want to extend our prayers and condolences to the victims of the tragic shooting in Jacksonville, Florida," the President said. "That was a terrible thing indeed. How it happens, nobody really knows."

Gunman said in 2017, 'I'm one of the better players'

Hours after the shooting, agents with the Bureau of Alcohol, Tobacco, Firearms and Explosives and FBI and Baltimore Police searched Katz's family home in Baltimore.

Katz went by the gaming naming "Bread" and previously won Madden tournaments in 2017, multiple gamers told CNN.

In February 2017, the Buffalo Bills tweeted out a picture of him after he won the Madden 17 Bills Championship. "Congrats to David Katz, the Madden 17 Bills Championship winner! Thanks for following along, Bills fans," the tweet read.

Suspect David Katz in 2017 when he won tournament.

In an interview after the win with former Buffalo Bills player Steve Tasker, Katz talked about his prowess.

"I think personally I'm one of the better players," he said.

Katz was previously a student at the University of Maryland, according to university spokeswoman Katie Lawson. Katz was enrolled beginning in September 2014, but he was not registered for classes as of August 26, 2018 and did not live on campus, Lawson said.

Katz underwent treatment for psychological and emotional issues, according to his parents' divorce records obtained Monday by CNN.

He was once placed on an antipsychotic medicine used to treat schizophrenia. His father, Richard Katz, objected, saying he "has seen no evidence whatsoever of schizophrenia in David Katz. David seems well aware of reality at all times."

The alleged gunman was also placed on two antidepressants, which his father said at the time "pose significant and unknown risks to the children."

The 2006 filing was part of a divorce and custody battle that was so acrimonious, both parents filed to have a guardian ad litem assigned to David, who was 12 at the time.

Both Elizabeth and Richard Katz are cooperating with investigators and have told authorities that their son had mental health issues, a source told CNN.

David Katz's parents could not be reached by CNN for comment on Monday.

"The massacre in Jacksonville is a tragic reminder of the threats we face from gun violence, no matter who we are or where our day takes us," said Giffords. "And it's yet another devastating indictment of this country's inability to keep our kids safe."

EA Sports, a video game developer and publisher, condemned the shooting as "a senseless act of violence."

CompLexity Gaming founder and CEO Jason Lake told CNN that the shooting may make the growing eSports industry reconsider security at events.

One of the company's gamers, a 19-year-old who goes by Drini, was shot in the thumb but managed to escape and is going to be fine, Lake said.

"To have someone walk into an event like this that's all about good sportsmanship and teamwork and just good vibes, and do something like this, it's heartbreaking," he said. "I think the e-sports industry as a whole is going to have to step back and take a look at further strengthening our security."