Attending a big wedding can be a tricky experience: What do you wear? Who do you need to avoid?

When you're agoraphobic and due to be your best mate's bridesmaid in a remote part of Scotland, those are the least of your worries.

You might assume that agoraphobia simply means being stuck in your house, fearful of the outside world.

However, it's actually much weirder than that. Aged 29, I developed a very specific form - the absolute fear of sleeping overnight anywhere other than in three specific houses.

And all of those were a long way from Scotland.

The weird thing is, I previously had a job that involved staying in different hotels every week. I was the kind of person who didn't buy shower gel because I had so many miniatures stashed away.

My phobia was hard to explain, so I usually made up excuses about why I couldn't stay somewhere and developed an encyclopaedic knowledge of transport timetables so I could get home the moment I felt the fear.

But I had one creeping commitment - bridesmaid duty.

My friend Emma had asked me to be one of three bridesmaids the year before my phobia developed, and I promised her that I would - I just hadn't foreseen that it would represent my own private vision of hell.

She told me it would be really informal, and easy to travel to - a hippy kind of wedding in Edinburgh.

I figured that, if I saved up for an eye-watering open return train ticket, I could probably handle it - with the help of beta blockers, herbal remedies, reiki and an escape route planned at all times. Not easy, but manageable.

But then it became a full-on white wedding. And it moved to a castle in rural Perthshire.

Emma tried to convince me that I could stay in a lovely little cottage in the grounds, or perhaps a nearby hotel. But I couldn't envisage a version of either that didn't involve endless hours of total fear.

So, I set about planning my escape from this wedding down to the tiniest detail.

The first challenge was how to get there for 11:00 to set up, get ready, and assist the bride-to-be.

I worked out that if I got a flight from Luton at 05:00, a train to Perth, and a 30-minute taxi ride, this was feasible. Of course the night before, while the rest of the wedding party enjoyed a chilled out night at the castle, I failed to sleep for fear of missing my alarm.

When I finally arrived, I was delirious with tiredness and for the next few hours, all I needed to do was focus on getting my eyeliner straight, putting the bride in her dress and getting through the ceremony. The thought that six hours later I would leave to get an overnight coach from Dundee soothed me significantly.

The service was excruciating. The urge to run away is never so strong as when it's absolutely not an option.

It took place outside, in beautiful gardens overlooking the hillside. So, as the bride and groom exchanged meaningful vows, my inner mantra was: "Pretend you're a sheep." I zoned into that world, and the next thing I knew, Emma and Keith were married, and I was on to my next task - serving canapes and champagne.

The weird thing about phobias is how personal they are. I quite like talking to strangers - I used to do it for a living. Wandering around saying "champagne? mini burger? I love your hat!" to 100 new faces was not intimidating. But the little voice that said, "what if the taxi doesn't turn up? What if the coach is cancelled?" put me continuously on edge.

I wondered whether I should book a back-up taxi, or find out if anyone was driving south that evening.

I told myself that in the worst case scenario I could offer my entire overdraft to anyone prepared to drive me 470 miles home at 21:00 on a Saturday night - it seemed like a better option than staying somewhere new.

I got through the photographs - the thought that I would soon leave made me smile - and with only half an hour left, I even began to enjoy myself. I could see that for everyone else, the wedding was fun.

Before dessert, I nipped to the loo, changed into my jeans and trainers, shoved my dress and heels in a bag and checked I had my water, crisps and my coach ticket all ready to roll. I felt a wave of excitement. Once I got to Dundee, I would only be 15 hours away from my own bed.

To me, that 15-hour coach ride meant freedom, while a hotel room symbolised being trapped.

I don't know if other guests thought it was weird to see a bridesmaid sneaking out before the speeches, but nobody said anything. Emma kindly mentioned that she was glad I had managed to be there, but was sad I was going to miss the dancing. And I was too. Sad that I couldn't be what I thought of as normal, and didn't really know how to tackle it.

By midnight, as the rest of the wedding party were jumping into a moonlit lake, my coach pulled into Glasgow. I ate my crisps and stared out of the window, feeling pleased with my choice. At 04:00 we stopped at a faceless service station on a desolate motorway, and I congratulated myself.

I had done it - I had been Emma's bridesmaid and avoided an overnight stay.

At that moment I saw just how irrational my phobia was. Here I was, eating a greasy burger in the wee hours, counting myself lucky to avoid a night in a grand castle.

Of course, if this was a neat and tidy story, I would have been cured at that moment. In reality, it took me three more years to build up to a two-night stay in Venice with my mum. And even then I snuck off for a "back-up" flight home a day early.

I've slowly edged towards sleeping in new places. I still take a survival kit, which includes stomach tablets and herbal tea, but I get to do what no agoraphobic takes for granted - go out.