Tully claimed that he'd had multiple psychotic episodes in Australia dating back to 2002, and more when he arrived back in New Zealand in 2012, along with multiple "blackouts".
Sometimes after what he called his "delusions", he would wake up in mental institutions, he claimed.
Hospital records in Western Australia where Tully worked in the mining industry suggested they were most likely drug-induced psychotic episodes.
Tully claimed to having been knocked unconscious during a softball bat attack in Ashburton before the shooting, which worsened the episodes.
During the hearing, Tully also claimed that he thought his tooth had a GPS unit to track him and that he reported to Ashburton police station in the days before what he consistently called "the alleged incident" to outline how a "Trojan horse" was going to infiltrate New Zealand, and he wanted to warn them about "autonomous dump trucks" threatening the country, and an "impending strike".
He also claimed that he has suffered from a skin condition since 2002 which affects his thinking.
Tully has repeatedly claimed that he was mentally unfit to stand trial.
Justice Mander rejected Tully's arguments that he was not fit to stand trial.
It's understood that Tully is appealing the decision.
He will be sentenced for the double murder, and a charge of attempted murder, next month.