Stott, who will follow in Gray’s footsteps when he joins the cast of River City in October, said the stage plays they performed together at the Edinburgh Festival Fringe had paved the way for him to win a part in the drama.
He said Gray had been responsible for the pair forming an annual drama double act at the Gilded Balloon after a backstage discussion at the panto where Stott revealed his acting ambitions.
Stott said he believed his acting career was over after Gray's death and the break-up of their on-stage partnership, only for him to be to be approached about a role in River City, which his panto co-star had appeared in.
He has already been filming scenes ahead of his first appearance on screen in October, although the details of his role are being kept under wraps by BBC Scotland.
Speaking in The 1% Club podcast, Stott said he was preparing for an "emotional rollercoaster" when he performs in this year's King's panto in Edinburgh and suggested he had not yet come to terms with Gray's death in January.
Stott, who will make his River City debut in October, said: “First and foremost, Andy was one of my closest friends. We had a relationship that you only really have with a close friend.
“He was the most generous, caring, loving man that I could think of, with his heart, his soul and his advice.
“Were it not for Andy, I would not have fulfilled that dream of teenage boy at high school of going on to act.
"We were in his dressing room at panto this year. I was saying to him: ‘I love doing panto, I love getting on stage at the King’s but there is part inside me that would I just love to see if I can act and do a play.
"He just said to me: ‘Well, I will do a play with you.’
"The first thing we did was phone (Gilded Balloon founder) Karen Koren. She scooped up the idea.
"We did a wonderful play written specially for us by Philip Meeks. We didn’t want to just do a spin-off of the panto, where it was all slapstick, comedy and routines. We wanted a bit of darkness, pathos and humour. We went on to win a Fringe First that year and we were off.”
The pair were forced to call off their final Fringe show, The Junkies, after just one performance in 2018, after Gray was diagnosed with cancer. Although he made a full recovery, he died in January weeks after testing positive for Covid-19.
Stott said: "When he died I kind of looked at that whole experience and thought: ‘Well, that’s it done. How else I am going to get the opportunity to act? It was just me and him.
"But unbeknown to me, it’s like he’s up there creating magic and the opportunity to go into River City came along. I’ve no doubt it is connected to Andy.
"We’d actually talked about me going into River City as his young son. It was the kind of thing we’d loved to have done, but it wasn’t to be.
"When the opportunity came in, I thought it was them kind of asking me to do a wrap-up for his character, but it turned out it wasn’t that.
"It just feels really nice, because Andy was such a big part of River City, so for me to continue is lovely.”
It was confirmed earlier this month that this year’s King’s Panto will see Gray’s daughter Clare join Stott, Allan Stewart and Jordan Young in the cast.
Stott said: "It’s a big show for two massive reasons. It’s our first show back after Covid, but it’s also our first show back after losing Andy. We’ve got a task on our hands to deal with both of those and do them justice.
"We’ve got a script in place and a pretty solid storyline. Of course, we can’t do a show without Andy featuring in some way, so that’s in there. That may change and evolve as we continue to talk and discuss and work it out on the rehearsal room floor. It’s difficult. You want to get it right.
"You want to do him justice and also want to acknowledge that the audience will want to remember him as well, but also have to remember that the audience will also want to have a good time.
"I can guarantee that whatever we do, we’ll be determined to do it right. We’ll give the audience a moment and we’ll give Andy his moment to be remembered as well.
"The thing is we’re all in this together. The unique thing about what we we have in Edinburgh is that it is like a family – on-stage, off-stage, backstage, front of house, the audience.
"We’ll get each other through it. It's going to be tough. It's going to be an emotional rollercoaster, because every show will have a different audience and every audience will want to give us a hug because Andy has gone, but we will do it and it’ll help us.
“I’m still not sure I’ve quite got a grip on what has actually happened, because the world is so different now.”