Actually a very similar effect is done in the learning maya books - ray gun tutorial from a long time ago.
Basically very straight forward to achieve - have your gun tip/barrel have an emitter ring. At the target where you want the "beam" to go create a target object - goal 1. Add a second object - I'd use a cone. Make sure that you create it with the pointy end along the X-axis. Place this object 1/2 way between your gun and the target.... this again with any work from you - point constrain it to both object - voila - it is 1/2 way between them! Aim constrain the cone to your target!
Rotate the goals - Yes - I said goals - now make the cone a second goal of your particle system. Rotate the emitter - keyframed - noise expression also works well here - NOTE: The cone should only be rotating around the X-axis.
Add goalWeight0PP - taret object of your particle object.
Add goalWeight1PP - cone object of your particle object.
Creation:
particleShape.lifespanPP = 2; //particles will live for 48 or 60 frames depending on your settings
particleShape.goalWeight0PP = 0; //target is not where we want the particles to go
particleShape.goalWeight1PP = 0.5; //the cone is the initial target - increase/decrease value to change speed of the particle
Now is the bit difficult part - and I am going to take the easy way out to do it - and explain the other way after this code.
Basically you want the particles to live until (Change your lifespan to lifespanPP)
Runtime:
goalWeight0PP = 0.5-linstep(0.5,1,age); //linstep will return 0.5-1 and we want it to only happen after 1/2 of the particle's life
//so we subtract 0.5 from it
goalWeight1PP = 0.5-linstep(0,0.5,age); //this returns us 0.5 - slowly decreasing to 0 goal 1/2 way through....
This leaves a bit of a lag in the middle because at the 1/2 way point this is not goalweight helping the particle along. You could add a Volume axis field - partent constrain it to the cone - scale it up and give it a direction force and turn off the away from force. This will help drive your particles towards the target. You could change the 0.5 values to 0.25 and 0.75 respectively to cover this well.
Good luck with this!
METHOD 2 - description only:
Basically you get the positions of your goal objects - I used this on the scorpion king movie - where you can have as many as you need. Now you figure out which is the first and second and third and... repeat.
Now you compare where the particle is relative to the target's location as it moves towards this goal. When it gets a certain distance away from it, you then look to the next goal object. You begin to decrease the goalWeight0PP and increase the goalWeight1PP based on whatever distance between each particle and its goal. The above we used the overall life of the particle to do this - distance is the better way to go, but more expressions are required. Once the particle gets close to goal1, begin to reduce the goalWeight1PP and begin to add goalWeight2PP to the particle... repeat and rise for all the rest of the goals.
Thus in either case you could make your particles bend, flow over and go around objects.
If your turn the particles to streaks or a gazillion points - renderman likes this - you can get really cool effects.
C