Half my brain died while trying to get that thing working
It's based on a polyobject which follows multiple 2-waypoint zoomtubes (I've used 2 waypoints because 1 alone crashes the game... So just put one over the other one, so you fake a single waypoint). There are some trigger sectors which activate the closest waypoints, so the polyobjects sort of "follow" the player. There's a better way to do it, though, but I don't really know how to explain it, unless I make an example wad...
The laser in ERZ2 uses 3 polyobjects, though... One of them hurts the player, the other one is the laser device itself, and the third one is just some eyecandy. It also uses relay FOFs to trigger the laser's movement, so you can disable and enable them wisely.
I hope that vague explanation helps at all. If not, whenever I get back to home, I'll do an example wad of the second method, which is cleaner and has less bugs (Edit: and it's easier to make).