A man died after being shot in the heart as his drunken friend played around with an air rifle.
Michael Loran had been drinking when the accident happened
Emergency services arrived at Michael Loran's home in Queens Gardens in East Calder to find Graeme Baxter, 32, slumped on a couch on 6 April.
Efforts to revive Mr Baxter failed, prosecuting advocate depute Alistair Brown told the High Court in Edinburgh.
Loran was found guilty of culpable homicide and will be sentenced next month.
Mr Brown told the court: "This was not merely a tragic accident."
At the time, both men had a blood alcohol level three-and-a-half times the legal limit for drivers.
Police found the walls and woodwork of Loran's house peppered with pellets.
The rifle and a supply of pellets had been acquired by Loran's son about a year before the shooting.
Unemployed Mr Baxter, who had learning difficulties, had arrived at Loran's home at about 0200 BST on the day he was shot, the court heard.
"There is no reason to suppose the accused was in any way unhappy to have Mr Baxter come to his house at that time and it is not suggested the two men argued, much less that they fought," said Mr Brown.
Doctors found Mr Baxter had died after a pellet penetrated the lining round his heart and the resulting bleeding stopped the heart from beating.
Medical experts said he could have continued to walk and talk for a very short time after he was shot and may have reached the sofa where he was found.
Loran was remanded in custody and judge Lord Macphail is due to sentence him when background reports have been prepared.