Did not start as a rampage, but as a targeted killing. He wanted to kill that particular Judge, and may have had help to get it going.
He went on his “rampage” after he assassinated the Judge.
He was in custody. The rampage started when he overcame the affirmative action hire grandmother Deputy Sheriff who was alone watching him in the courthouse, took her gun and then went after the judge and anyone else in his way/nearby. It was a very different, much more preventable event.