A man accused of four murders wanted to kill as many people as he could before he was arrested, a consultant psychiatrist has told the Old Bailey.
Marie Harding was the first to die in Sussex during the killing spree
Daniel Gonzalez was "bored and wanted to know what it felt like", Dr Philip Joseph said.
"He said it was a bit like the film Halloween," Dr Joseph told the court.
Gonzalez, 25, from Woking, Surrey, denies murdering three people in London and a woman in Sussex. The defence argues the killings were manslaughter.
Giving evidence on Friday, Dr Joseph said: "He said it took two days to plan - to plan to kill as many people as possible until he was arrested."
The psychiatrist said he asked Gonzalez about Michael Ryan and whether he was copying the Hungerford killer, but Gonzalez said he was not copying anyone.
He said: "He had not thought of the consequences or chosen victims. He liked the idea about being all over the papers."
The court heard that Gonzalez told Dr Joseph: "I had a really rubbish life and wanted to take it out on someone else."
And he said that on the day Gonzalez knifed three people: "He had been looking forward to killing someone. He had psyched himself up saying 'come on boy'."
Dr Joseph has said he disagreed with a defence psychiatrist who concluded Gonzalez was a schizophrenic.
But Dr Joseph did agree Gonzalez had an "anti-social personality disorder".
Gonzalez is accused of murdering Jean and Derek Robinson and Kevin Molloy in London, and Marie Harding in Hove, East Sussex, over three days in September 2004.
He has admitted the attempted murder of two other people in Portsmouth and London.
The defence accepts Gonzalez killed each of his four victims, but says he was suffering from auditory hallucinations - voices commanding him to kill - which diminished his responsibility
The trial continues.