What you want is solenoid switches controling the coils and magnets, as well as a PICAXE 18X microcontroler taking care of the switches.
the hard part is telling the PIC when to turn the switch off, whis could be dome with an LDR (light dependant resistor) and an LED (Light emmiting diode), the theory is simple, when the LDR can see light, keep the switch on, but when the projectile passes through that light turn the switch off.
there are probably simpler ways of turning the switch off at the right time, but those are probably harder to get working, i.e a timer in the PIC
