manufactures frights, so pupils learn how to deal with real-life danger.
Fiona MacLeod reports
as they peer through the chain-link fence, a small group of 11-year-olds can see a football on the other side of the railway track. There is a hole in the fence and no train in sight.
"Would you get the ball?" asks 23-year-old Darren Hope. But as soon as one pupil steps on the line, a metal squeal instantly heralds the thunder of an approaching train.
With lights blazing, it races on through the tunnel and in a split second narrowly misses the boy.
Hearts racing, the group gaze wide-eyed at their classmate and each other, gripped by a feeling that they have had a narrow escape, yet simultaneously aware they were never in danger from the projected image on a painted tunnel entrance. It was a ghost train. The message is clear, however - imagine it had been real. None of these children will forget how quickly a train can bear down.
Their guide, Darren, is showing them around the Risk Factory, where "risks"
are manufactured in an enormous warehouse-type building near the Corn Exchange in Edinburgh. It is funded with pound;1.5 million from West Lothian, Midlothian, East Lothian and Edinburgh City councils.
The project replaces the Crucial Crew, a band of emergency service workers who used to visit schools, armed with scary CCTV footage of children playing on railways, and advise them on dangerous situations. Since the factory opened in January, 3,000 P7s have taken the tour and another 5,000 are expected this year.
Angela Mackie, the teacher of this particular group from Letham Primary in West Lothian, says: "It is a fantastic facility. The scenarios are so lifelike. You can tell pupils about all the dangers, but here they are seeing it."
Her colleague, Katie Fisher, says: "You have to have something really stimulating and dynamic to motivate P7s, otherwise they just sit there with the message going over their heads."
And the group are certainly getting into it. We've moved on to a real Lothians bus, parked at a mock-up street scene. Our guide makes sure we wait for the green man to light up before we cross. Once inside the bus, he plays a recording of a rock being thrown at the bus window. The children jump at the noise and Darren explains the danger. The looks of revelation on their faces show the message is sinking in.
Further up the street, the children discover an accident. A girl has been knocked off her bike and they relish the chance to be crime scene investigators, entrusted with figuring out who was to blame. The girl is not wearing much reflective clothing, her brakes are faulty and a mobile phone lies on the dashboard of the car.
Next they run the gauntlet down a dark alley where a smoking, shadowy figure looms out of the shadows at them. "Should we take shortcuts down dark alleyways?" queries Darren. "No!" chorus the awed group.
At this factory, the manufacturing is in bulk. There are so many risky scenarios - a stranger entering your home, playing on a building site, falling into a canal, getting swept out to sea on a lilo, or being approached by a predatory paedophile in an internet chatroom - it is hard to keep track. Fortunately, no child is likely to experience a real day as traumatic as this one.
But, for this group, it is the best day of the week. Thrown into risky, albeit staged situations, the youngsters rise admirably to the challenge.
Visiting a mock-up of granny's flat, they are left alone to chat with her but are roused when a fire breaks out and the smoke detector goes off.
Daniel, 11, flees but remembers to rescue granny. His classmates attempt first aid, another runs to the phone box to call the fire brigade. But they fail the test when granny's neighbour prevails on them to enter the burning building to rescue her.
Lothians fire officer Gillian Hislop tells them: "You should not have gone back in because you are irreplaceable and should never go back into a burning building."