Simple. A double-poled electro-magnet is energized by the shock; by their position at once. The cold surface condenses the water in.