There are definitely things we can do to prevent school shootings. Without oversimplifying this complex issue, I want to address a couple of areas that we can control. I gathered data from multiple sources for this article.

There is no accurate or useful ‘profile’ of students who have engaged in targeted school violence. Most did well in school, with 41 percent getting As and Bs, so don’t gloss over signs that teens are struggling just because they have good grades. Almost half of school shooters were considered to be part of the mainstream crowd at school, almost two-thirds never or rarely got into trouble at school, and most had no history of violence or criminal behavior. But there are types of behaviors that are common to planning or carrying out attacks, which is where prevention can come into play.

Most perpetrators had experienced suicidal thoughts (78 percent) or depression (61 percent), though only one-third had ever received a mental health evaluation. Most had trouble coping with significant loss or failures before the attack, like failed romantic relationships, failing grades, and family deaths or illnesses. Kids need help when they show signs of depression or desperation; individual or family counseling offers them tools to deal with stresses and emotions.

Many attackers felt bullied, persecuted or injured by others and said they had tried without success to get someone to intervene. Revenge was a motive for more than half of the attackers (61 percent). The most effective anti-bullying programs focus mostly on bystanders, not the victim or perpetrator. Kids who feel included and valuable and have a good sense of connection with their peers and teachers will not attack people. Students need recurring dialogue with each other to resolve conflicts and learn social-emotional coping skills. This is a much more effective strategy than metal detectors and teachers with guns.

In most cases, the attacker’s observable behavior gave hints prior to the attack. Someone else often knew about the plan, but this information rarely made its way to an adult who could have intervened. Schools need to take concerns seriously.

Nearly two-thirds of the attackers had a known history of weapons use, and most acquired their guns from home. Many also tended to be obsessed with guns and violent media. The 19-year-old who killed 17 people in a Florida high school used a semi-automatic AR-15 military-style assault rifle that he purchased at age 18. Why is this allowed?

I encourage parents to give their teenagers some privacy, but if a teen seems depressed, withdrawn or aggressive, look for clues about the child’s mental health in diary entries, social media posts and texts. In most past cases, adults would have seen posts about rejection, injustices or unrealistic fears, attempts to recruit peers, an obsession with weapons and plans to take revenge. Pay attention to these red flags and take immediate action.

The best way to prevent school shootings is to address widespread problems that are at the root of why kids become perpetrators. We should focus our energy on boosting the connections of the entire school community and be more attuned to kids who show signs of being troubled. Empower the bystanders by taking their concerns seriously. Make sure every kid with any level of mental health concern gets treatment. And most importantly, start using your voices and votes for significant gun reform.

Tim Jordan, M.D., is a behavioral pediatrician who specializes in counseling girls ages 6 through college. He recently launched an online video parenting course, Taking Flight: Everyday Parenting Wisdom to Help Girls Soar. For more information, visit drtimjordan.com.